Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save tomwwright/36013a6e101fd908ad1916d0a5fba752 to your computer and use it in GitHub Desktop.
Save tomwwright/36013a6e101fd908ad1916d0a5fba752 to your computer and use it in GitHub Desktop.
ansibled : elasticsearch : tasks : setup cluster : configuration templates
{
"DomainName": "{{ elasticsearch_name }}",
"ElasticsearchVersion": "{{ elasticsearch_version }}",
"ElasticsearchClusterConfig": {
"InstanceType": "{{ elasticsearch_instance_type }}",
"InstanceCount": {{ elasticsearch_instance_count }},
"ZoneAwarenessEnabled": {{ (elasticsearch_instance_count == 1) | ternary('false', 'true') }},
"DedicatedMasterEnabled": {{ elasticsearch_dedicated_masters_enabled | lower }},
{% if elasticsearch_dedicated_masters_enabled %}
"DedicatedMasterType": "{{ elasticsearch_dedicated_masters_type }}",
"DedicatedMasterCount": {{ elasticsearch_dedicated_masters_count }},
{% endif %}
},
"EBSOptions": {
"EBSEnabled": true,
"VolumeType": "gp2",
"VolumeSize": {{ elasticsearch_ebs_size_gb }},
},
"AccessPolicies": "{{ lookup('template', 'files/elasticsearch-access-policy.json.j2') | to_json | regex_replace('\"', '\\\"') }}",
"SnapshotOptions": {
"AutomatedSnapshotStartHour": 14
},
"VPCOptions": {
"SubnetIds": [
"{{ vpc_subnet_ids['private-a'] }}",
"{{ vpc_subnet_ids['private-b'] }}"
],
"SecurityGroupIds": [
"{{ vpc_security_group_ids['vpc'] }}"
]
}
}
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Principal": {
"AWS": "{{ aws_account_id }}"
},
"Action": "es:*",
"Resource": "arn:aws:es:{{ aws_region }}:{{ aws_account_id }}:domain/{{ elasticsearch_name }}/*"
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment