Guest User

Untitled

a guest
Oct 18th, 2018
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. #This format takes into account the following and formats properly to connect to the instance:
  2. # - Using a specific private
  3. # - Specify the correct user
  4. # - Adding sshpass variable for authentication
  5. # - Have password protected key
  6.  
  7. - name: add new instance to hosts
  8. add_host:
  9. hostname: "{{ item.public_ip }}"
  10. ansible_ssh_private_key_file: ~/.ssh/jfrap-web2
  11. ansible_user: "ec2-user"
  12. ansible_ssh_pass: "{{ sshpass }}"
  13. groupname: awslinux
  14. with_items: "{{ ec2.instances }}"
Add Comment
Please, Sign In to add comment