Skip to content

Commit b132820

Browse files
committed
When using the AWS inventory plugin some host vars (ec2_private_dns_name ec2_dns_name) were renamed
1 parent 515bc3a commit b132820

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

playbooks/clouds/add_nodes_aws.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
- name: Add nodes to hadoop-cluster and {{ outer_loop.host_group }} groups
55
add_host:
6-
name: "{{ (outer_loop.public_ip|default(false)== true) | ternary(hostvars[local_loop].ec2_dns_name,hostvars[local_loop].ec2_private_dns_name) }}"
7-
ansible_host: "{{ (outer_loop.public_ip|default(false)== true) | ternary(hostvars[local_loop].ec2_ip_address,hostvars[local_loop].ec2_private_ip_address) }}"
6+
name: "{{ (outer_loop.public_ip|default(false)) | ternary(hostvars[local_loop].public_dns_name,hostvars[local_loop].private_dns_name) }}"
7+
ansible_host: "{{ (outer_loop.public_ip|default(false)) | ternary(hostvars[local_loop].public_ip_address,hostvars[local_loop].private_ip_address) }}"
88
ansible_user: "{{ cloud_config.admin_username|default('root') }}"
99
ansible_ssh_private_key_file: "{{ cloud_config.ssh.privatekey }}"
1010
ansible_become_user: root

0 commit comments

Comments
 (0)