--- - hosts: 172.16.0.161 roles: - role: ../roles/elastic-stack/ansible-elasticsearch elasticsearch_network_host: 172.16.0.161 elasticsearch_bootstrap_node: true elasticsearch_cluster_nodes: - 172.16.0.161 node_certs_generator: true node_name: node-1 elasticsearch_xpack_security: true vars: instances: - name: node-1 # Important: must be equal to node name. ip: 172.16.0.161 # When unzipping, node will search for his node name folder to get the cert. - name: node-2 ip: 172.16.0.162 - name: node-3 ip: 172.16.0.163 - hosts: 172.16.0.162 roles: - role: ../roles/elastic-stack/ansible-elasticsearch elasticsearch_network_host: 172.16.0.162 elasticsearch_xpack_security: true elasticsearch_node_name: node-2 elasticsearch_discovery_nodes: - 172.16.0.161 - 172.16.0.162 - 172.16.0.163 - hosts: 172.16.0.163 roles: - role: ../roles/elastic-stack/ansible-elasticsearch elasticsearch_network_host: 172.16.0.163 elasticsearch_xpack_security: true elasticsearch_node_name: node-3 elasticsearch_discovery_nodes: - 172.16.0.161 - 172.16.0.162 - 172.16.0.163