As of 22/04/2021 merge the use of group name that use hyphen (-) will change to use underscore (_) instead since hyphen is invalid character for Ansible group name.
This role can install in different node configuration:
- Standalone
- Cluster
- All in one node
- Master node
- Data node
- Client node
Also with various configuration:
- SSL encryption
- License activation
- If you install with SSL HTTP enabled. The target hosts will need to have full FQDN* set. Otherwise both change password and activate license task will fail since it require domain to connect. I have already updated inventory example in description.
elasticsearch_data_path
: Specified data pathelasticsearch_log_path
: Specified log pathelasticsearch_http_port
: Specified HTTP portelasticsearch_transport_port
: Specified range of transport portselasticsearch_host_license_file_path
: Specified your license file in playbook folder (optional)elasticsearch_ssl_enabled
: Enable/disable SSL encryption (Optional)elasticsearch_ssl_transport_enabled
: Enable/disable transport SSL encryptionelasticsearch_ssl_http_enabled
: Enable/disable HTTP SSL encryptionelasticsearch_host_ssl_key_file_path
: Specified your private key file in playbook folderelasticsearch_host_ssl_cert_file_path
: Specified your certificate file in playbook folderelasticsearch_host_ssl_ca_file_path
: Specified your CA file in playbook folderelasticsearch_data_path
: Specified data pathelasticsearch_log_path
: Specified log pathelasticsearch_password
: Sepcified password for elastic default usernameelasticsearch_min_heap_size
: Minimum java heap sizeelasticsearch_max_heap_size
: Maximum java heap size
- Standalone
[elasticsearch]
elasticsearch ansible_user=ubuntu ansible_host=x.x.x.x ansible_port=22
- All in one cluster
elasticsearch-1 ansible_user=ubuntu ansible_host=x.x.x.x ansible_port=22
elasticsearch-2 ansible_user=ubuntu ansible_host=x.x.x.x ansible_port=22
elasticsearch-3 ansible_user=ubuntu ansible_host=x.x.x.x ansible_port=22
[elasticsearch]
elasticsearch-1
elasticsearch-2
elasticsearch-3
- Multiple roles cluster
elasticsearch-master-1 ansible_user=ubuntu ansible_host=x.x.x.x ansible_port=22
elasticsearch-master-2 ansible_user=ubuntu ansible_host=x.x.x.x ansible_port=22
elasticsearch-master-3 ansible_user=ubuntu ansible_host=x.x.x.x ansible_port=22
elasticsearch-data-1 ansible_user=ubuntu ansible_host=x.x.x.x ansible_port=22
elasticsearch-data-2 ansible_user=ubuntu ansible_host=x.x.x.x ansible_port=22
kibana ansible_user=ubuntu ansible_host=x.x.x.x ansible_port=22
[elasticsearch_master]
elasticsearch-master-1
elasticsearch-master-2
elasticsearch-master-3
[elasticsearch_data]
elasticsearch-data-1
elasticsearch-data-2
[elasticsearch_client]
kibana
- Adding storage tier attribute to node
elasticsearch-master-1 ansible_user=ubuntu ansible_host=x.x.x.x ansible_port=22
elasticsearch-master-2 ansible_user=ubuntu ansible_host=x.x.x.x ansible_port=22
elasticsearch-master-3 ansible_user=ubuntu ansible_host=x.x.x.x ansible_port=22
elasticsearch-data-1 ansible_user=ubuntu ansible_host=x.x.x.x ansible_port=22
elasticsearch-data-2 ansible_user=ubuntu ansible_host=x.x.x.x ansible_port=22
elasticsearch-data-3 ansible_user=ubuntu ansible_host=x.x.x.x ansible_port=22
[elasticsearch_hot]
elasticsearch-data-1
[elasticsearch_warm]
elasticsearch-data-2
[elasticsearch_cold]
elasticsearch-data-3
Remark: If you install with SSL HTTP enabled. The target hosts will need to have full FQDN. Otherwise both change password and activate license task will fail since it require domain to connect.
- hosts: all
roles:
- ansible-elasticsearch
MIT
Opsta (Thailand) Co.,Ltd.