ITOPS-1671 get clusternode from ec2_facts else fqdn

This commit is contained in:
Brett Meehan
2019-07-05 16:04:18 +10:00
parent 7c01935323
commit 951346ad49

View File

@@ -7,8 +7,9 @@
ec2_metadata_facts:
tags:
- notest
ignore_errors: yes
- name: Use EC2 instance ID for cluster node ID
set_fact:
atl_cluster_node_id: "{{ ansible_ec2_instance_id }}"
atl_local_ipv4: "{{ ansible_ec2_local_ipv4 | default(ansible_default_ipv4) }}"
atl_cluster_node_id: "{{ ansible_ec2_instance_id | default(ansible_fqdn) }}"
atl_local_ipv4: "{{ ansible_ec2_local_ipv4 | default(ansible_default_ipv4.address) }}"