Skip to content

Commit

Permalink
When using the AWS inventory plugin some host vars (ec2_private_dns_n…
Browse files Browse the repository at this point in the history
…ame ec2_dns_name) were renamed
  • Loading branch information
lhoss committed Sep 19, 2019
1 parent 1d77278 commit 4a21de4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions playbooks/clouds/add_nodes_aws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

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

0 comments on commit 4a21de4

Please sign in to comment.