Created
March 19, 2018 09:44
-
-
Save tomwwright/36013a6e101fd908ad1916d0a5fba752 to your computer and use it in GitHub Desktop.
ansibled : elasticsearch : tasks : setup cluster : configuration templates
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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'] }}" | |
] | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"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