Hi Alex,
- I am not sure I understood “placing the availability zone in the region field instead of the region” correctly. Because when I exported “us-west-2a” as AWS_DEFAULT_REGION (which my ec2.py is using to filter region), it gave me error like this:
`
ERROR! The file inventory/ec2.py is marked as executable, but failed to execute correctly. If this is not supposed to be an executable script, correct this with chmod -x inventory/ec2.py
.
Inventory script (inventory/ec2.py) had an execution error: region name: us-west-2a likely not supported, or AWS is down. connection to region failed.
inventory/ec2.py:3: Error parsing host definition ‘’‘’': No closing quotation
`
Let me know where can I place AZ instead of region.
- Yes, I tried executing
./inventory/ec2.py --refresh-cache
between instance creation playbook and ping command, but with no luck ! And IMHO it doesn’t matter to refresh cache as I have “cache_max_age = 0” in ec2.ini. (Correct me if I am wrong.)
For the first time when I ping doesn’t succeed, verbose and console output is:
[Private_IP1 and Private_IP2 are the instances already running and matching the filter in ec2.py, Private_IP3 is the IP of the instance just launched and waited for port 22 successfully]
`
Using /etc/ansible/ansible.cfg as config file
Loaded callback minimal of type stdout, v2.0
<Private_IP1> ESTABLISH SSH CONNECTION FOR USER: centos
<Private_IP3> ESTABLISH SSH CONNECTION FOR USER: centos
<Private_IP3> SSH: ansible.cfg set ssh_args: (-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
<Private_IP3> SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: (-o)(StrictHostKeyChecking=no)
<Private_IP1> SSH: ansible.cfg set ssh_args: (-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
<Private_IP1> SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: (-o)(StrictHostKeyChecking=no)
<Private_IP1> SSH: ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: (-o)(IdentityFile=“/home/ubuntu/.ssh/MyKey.pem”)
<Private_IP3> SSH: ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: (-o)(IdentityFile=“/home/ubuntu/.ssh/MyKey.pem”)
<Private_IP3> SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<Private_IP3> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User=centos)
<Private_IP1> SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<Private_IP1> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User=centos)
<Private_IP1> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
<Private_IP3> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
<Private_IP3> SSH: PlayContext set ssh_common_args: ()
<Private_IP3> SSH: PlayContext set ssh_extra_args: ()
<Private_IP1> SSH: PlayContext set ssh_common_args: ()
<Private_IP1> SSH: PlayContext set ssh_extra_args: ()
<Private_IP1> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/ubuntu/.ansible/cp/ansible-ssh-%h-%p-%r)
<Private_IP3> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/ubuntu/.ansible/cp/ansible-ssh-%h-%p-%r)
<Private_IP3> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o ‘IdentityFile=“/home/ubuntu/.ssh/MyKey.pem”’ -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=centos -o ConnectTimeout=10 -o ControlPath=/home/ubuntu/.ansible/cp/ansible-ssh-%h-%p-%r Private_IP3 ‘/bin/sh -c ‘"’"’( umask 77 && mkdir -p “echo $HOME/.ansible/tmp/ansible-tmp-1474528176.32-147953530428586
” && echo ansible-tmp-1474528176.32-147953530428586=“echo $HOME/.ansible/tmp/ansible-tmp-1474528176.32-147953530428586
” ) && sleep 0’“'”‘’
<Private_IP1> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o ‘IdentityFile=“/home/ubuntu/.ssh/MyKey.pem”’ -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=centos -o ConnectTimeout=10 -o ControlPath=/home/ubuntu/.ansible/cp/ansible-ssh-%h-%p-%r Private_IP1 ‘/bin/sh -c ‘"’"’( umask 77 && mkdir -p “echo $HOME/.ansible/tmp/ansible-tmp-1474528176.32-242806970585719
” && echo ansible-tmp-1474528176.32-242806970585719=“echo $HOME/.ansible/tmp/ansible-tmp-1474528176.32-242806970585719
” ) && sleep 0’“'”‘’
<Private_IP2> ESTABLISH SSH CONNECTION FOR USER: centos
<Private_IP2> SSH: ansible.cfg set ssh_args: (-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
<Private_IP2> SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: (-o)(StrictHostKeyChecking=no)
<Private_IP2> SSH: ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: (-o)(IdentityFile=“/home/ubuntu/.ssh/MyKey.pem”)
<Private_IP2> SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<Private_IP2> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User=centos)
<Private_IP2> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
<Private_IP2> SSH: PlayContext set ssh_common_args: ()
<Private_IP2> SSH: PlayContext set ssh_extra_args: ()
<Private_IP2> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/ubuntu/.ansible/cp/ansible-ssh-%h-%p-%r)
<Private_IP2> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o ‘IdentityFile=“/home/ubuntu/.ssh/MyKey.pem”’ -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=centos -o ConnectTimeout=10 -o ControlPath=/home/ubuntu/.ansible/cp/ansible-ssh-%h-%p-%r Private_IP2 ‘/bin/sh -c ‘"’"’( umask 77 && mkdir -p “echo $HOME/.ansible/tmp/ansible-tmp-1474528176.32-96061508357666
” && echo ansible-tmp-1474528176.32-96061508357666=“echo $HOME/.ansible/tmp/ansible-tmp-1474528176.32-96061508357666
” ) && sleep 0’“'”‘’
<Private_IP1> PUT /tmp/tmplSwpxr TO /home/centos/.ansible/tmp/ansible-tmp-1474528176.32-242806970585719/ping
<Private_IP1> SSH: ansible.cfg set ssh_args: (-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
<Private_IP1> SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: (-o)(StrictHostKeyChecking=no)
<Private_IP1> SSH: ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: (-o)(IdentityFile=“/home/ubuntu/.ssh/MyKey.pem”)
<Private_IP1> SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<Private_IP1> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User=centos)
<Private_IP1> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
<Private_IP1> SSH: PlayContext set ssh_common_args: ()
<Private_IP1> SSH: PlayContext set sftp_extra_args: ()
<Private_IP1> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/ubuntu/.ansible/cp/ansible-ssh-%h-%p-%r)
<Private_IP1> SSH: EXEC sftp -b - -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o ‘IdentityFile=“/home/ubuntu/.ssh/MyKey.pem”’ -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=centos -o ConnectTimeout=10 -o ControlPath=/home/ubuntu/.ansible/cp/ansible-ssh-%h-%p-%r ‘[Private_IP1]’
<Private_IP2> PUT /tmp/tmptkiK31 TO /home/centos/.ansible/tmp/ansible-tmp-1474528176.32-96061508357666/ping
<Private_IP2> SSH: ansible.cfg set ssh_args: (-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
<Private_IP2> SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: (-o)(StrictHostKeyChecking=no)
<Private_IP2> SSH: ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: (-o)(IdentityFile=“/home/ubuntu/.ssh/MyKey.pem”)
<Private_IP2> SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<Private_IP2> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User=centos)
<Private_IP2> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
<Private_IP2> SSH: PlayContext set ssh_common_args: ()
<Private_IP2> SSH: PlayContext set sftp_extra_args: ()
<Private_IP2> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/ubuntu/.ansible/cp/ansible-ssh-%h-%p-%r)
<Private_IP2> SSH: EXEC sftp -b - -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o ‘IdentityFile=“/home/ubuntu/.ssh/MyKey.pem”’ -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=centos -o ConnectTimeout=10 -o ControlPath=/home/ubuntu/.ansible/cp/ansible-ssh-%h-%p-%r ‘[Private_IP2]’
<Private_IP1> ESTABLISH SSH CONNECTION FOR USER: centos
<Private_IP1> SSH: ansible.cfg set ssh_args: (-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
<Private_IP1> SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: (-o)(StrictHostKeyChecking=no)
<Private_IP1> SSH: ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: (-o)(IdentityFile=“/home/ubuntu/.ssh/MyKey.pem”)
<Private_IP1> SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<Private_IP1> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User=centos)
<Private_IP1> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
<Private_IP1> SSH: PlayContext set ssh_common_args: ()
<Private_IP1> SSH: PlayContext set ssh_extra_args: ()
<Private_IP1> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/ubuntu/.ansible/cp/ansible-ssh-%h-%p-%r)
<Private_IP1> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o ‘IdentityFile=“/home/ubuntu/.ssh/MyKey.pem”’ -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=centos -o ConnectTimeout=10 -o ControlPath=/home/ubuntu/.ansible/cp/ansible-ssh-%h-%p-%r -tt Private_IP1 ‘/bin/sh -c ‘"’“‘LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /home/centos/.ansible/tmp/ansible-tmp-1474528176.32-242806970585719/ping; rm -rf “/home/centos/.ansible/tmp/ansible-tmp-1474528176.32-242806970585719/” > /dev/null 2>&1 && sleep 0’”’“‘’
<Private_IP2> ESTABLISH SSH CONNECTION FOR USER: centos
<Private_IP2> SSH: ansible.cfg set ssh_args: (-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
<Private_IP2> SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: (-o)(StrictHostKeyChecking=no)
<Private_IP2> SSH: ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: (-o)(IdentityFile=”/home/ubuntu/.ssh/MyKey.pem")
<Private_IP2> SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<Private_IP2> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User=centos)
<Private_IP2> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
<Private_IP2> SSH: PlayContext set ssh_common_args: ()
<Private_IP2> SSH: PlayContext set ssh_extra_args: ()
<Private_IP2> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/ubuntu/.ansible/cp/ansible-ssh-%h-%p-%r)
<Private_IP2> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o ‘IdentityFile=“/home/ubuntu/.ssh/MyKey.pem”’ -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=centos -o ConnectTimeout=10 -o ControlPath=/home/ubuntu/.ansible/cp/ansible-ssh-%h-%p-%r -tt Private_IP2 ‘/bin/sh -c ‘"’“‘LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /home/centos/.ansible/tmp/ansible-tmp-1474528176.32-96061508357666/ping; rm -rf “/home/centos/.ansible/tmp/ansible-tmp-1474528176.32-96061508357666/” > /dev/null 2>&1 && sleep 0’”’"‘’
Private_IP1 | SUCCESS => {
“changed”: false,
“invocation”: {
“module_args”: {
“data”: null
},
“module_name”: “ping”
},
“ping”: “pong”
}
Private_IP2 | SUCCESS => {
“changed”: false,
“invocation”: {
“module_args”: {
“data”: null
},
“module_name”: “ping”
},
“ping”: “pong”
}
Private_IP3 | UNREACHABLE! => {
“changed”: false,
“msg”: “Failed to connect to the host via ssh.”,
“unreachable”: true
}
`
On the second time (after half a min max) when it succeeds, the logs are:
`
Using /etc/ansible/ansible.cfg as config file
Loaded callback minimal of type stdout, v2.0
<Private_IP3> ESTABLISH SSH CONNECTION FOR USER: centos
<Private_IP3> SSH: ansible.cfg set ssh_args: (-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
<Private_IP1> ESTABLISH SSH CONNECTION FOR USER: centos
<Private_IP1> SSH: ansible.cfg set ssh_args: (-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
<Private_IP3> SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: (-o)(StrictHostKeyChecking=no)
<Private_IP3> SSH: ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: (-o)(IdentityFile=“/home/ubuntu/.ssh/MyKey.pem”)
<Private_IP1> SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: (-o)(StrictHostKeyChecking=no)
<Private_IP1> SSH: ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: (-o)(IdentityFile=“/home/ubuntu/.ssh/MyKey.pem”)
<Private_IP1> SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<Private_IP3> SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<Private_IP3> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User=centos)
<Private_IP3> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
<Private_IP1> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User=centos)
<Private_IP1> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
<Private_IP1> SSH: PlayContext set ssh_common_args: ()
<Private_IP3> SSH: PlayContext set ssh_common_args: ()
<Private_IP3> SSH: PlayContext set ssh_extra_args: ()
<Private_IP1> SSH: PlayContext set ssh_extra_args: ()
<Private_IP1> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/ubuntu/.ansible/cp/ansible-ssh-%h-%p-%r)
<Private_IP3> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/ubuntu/.ansible/cp/ansible-ssh-%h-%p-%r)
<Private_IP1> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o ‘IdentityFile=“/home/ubuntu/.ssh/MyKey.pem”’ -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=centos -o ConnectTimeout=10 -o ControlPath=/home/ubuntu/.ansible/cp/ansible-ssh-%h-%p-%r Private_IP1 ‘/bin/sh -c ‘"’"’( umask 77 && mkdir -p “echo $HOME/.ansible/tmp/ansible-tmp-1474528970.94-42038548997439
” && echo ansible-tmp-1474528970.94-42038548997439=“echo $HOME/.ansible/tmp/ansible-tmp-1474528970.94-42038548997439
” ) && sleep 0’“'”‘’
<Private_IP3> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o ‘IdentityFile=“/home/ubuntu/.ssh/MyKey.pem”’ -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=centos -o ConnectTimeout=10 -o ControlPath=/home/ubuntu/.ansible/cp/ansible-ssh-%h-%p-%r Private_IP3 ‘/bin/sh -c ‘"’"’( umask 77 && mkdir -p “echo $HOME/.ansible/tmp/ansible-tmp-1474528970.94-11790883317121
” && echo ansible-tmp-1474528970.94-11790883317121=“echo $HOME/.ansible/tmp/ansible-tmp-1474528970.94-11790883317121
” ) && sleep 0’“'”‘’
<Private_IP2> ESTABLISH SSH CONNECTION FOR USER: centos
<Private_IP2> SSH: ansible.cfg set ssh_args: (-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
<Private_IP2> SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: (-o)(StrictHostKeyChecking=no)
<Private_IP2> SSH: ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: (-o)(IdentityFile=“/home/ubuntu/.ssh/MyKey.pem”)
<Private_IP2> SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<Private_IP2> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User=centos)
<Private_IP2> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
<Private_IP2> SSH: PlayContext set ssh_common_args: ()
<Private_IP2> SSH: PlayContext set ssh_extra_args: ()
<Private_IP2> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/ubuntu/.ansible/cp/ansible-ssh-%h-%p-%r)
<Private_IP2> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o ‘IdentityFile=“/home/ubuntu/.ssh/MyKey.pem”’ -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=centos -o ConnectTimeout=10 -o ControlPath=/home/ubuntu/.ansible/cp/ansible-ssh-%h-%p-%r Private_IP2 ‘/bin/sh -c ‘"’"’( umask 77 && mkdir -p “echo $HOME/.ansible/tmp/ansible-tmp-1474528970.94-115245318606115
” && echo ansible-tmp-1474528970.94-115245318606115=“echo $HOME/.ansible/tmp/ansible-tmp-1474528970.94-115245318606115
” ) && sleep 0’“'”‘’
<Private_IP1> PUT /tmp/tmpIzmsRg TO /home/centos/.ansible/tmp/ansible-tmp-1474528970.94-42038548997439/ping
<Private_IP1> SSH: ansible.cfg set ssh_args: (-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
<Private_IP1> SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: (-o)(StrictHostKeyChecking=no)
<Private_IP1> SSH: ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: (-o)(IdentityFile=“/home/ubuntu/.ssh/MyKey.pem”)
<Private_IP1> SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<Private_IP1> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User=centos)
<Private_IP1> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
<Private_IP1> SSH: PlayContext set ssh_common_args: ()
<Private_IP1> SSH: PlayContext set sftp_extra_args: ()
<Private_IP1> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/ubuntu/.ansible/cp/ansible-ssh-%h-%p-%r)
<Private_IP1> SSH: EXEC sftp -b - -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o ‘IdentityFile=“/home/ubuntu/.ssh/MyKey.pem”’ -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=centos -o ConnectTimeout=10 -o ControlPath=/home/ubuntu/.ansible/cp/ansible-ssh-%h-%p-%r ‘[Private_IP1]’
<Private_IP2> PUT /tmp/tmppBD_UL TO /home/centos/.ansible/tmp/ansible-tmp-1474528970.94-115245318606115/ping
<Private_IP2> SSH: ansible.cfg set ssh_args: (-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
<Private_IP2> SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: (-o)(StrictHostKeyChecking=no)
<Private_IP2> SSH: ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: (-o)(IdentityFile=“/home/ubuntu/.ssh/MyKey.pem”)
<Private_IP2> SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<Private_IP2> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User=centos)
<Private_IP2> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
<Private_IP2> SSH: PlayContext set ssh_common_args: ()
<Private_IP2> SSH: PlayContext set sftp_extra_args: ()
<Private_IP2> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/ubuntu/.ansible/cp/ansible-ssh-%h-%p-%r)
<Private_IP2> SSH: EXEC sftp -b - -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o ‘IdentityFile=“/home/ubuntu/.ssh/MyKey.pem”’ -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=centos -o ConnectTimeout=10 -o ControlPath=/home/ubuntu/.ansible/cp/ansible-ssh-%h-%p-%r ‘[Private_IP2]’
<Private_IP1> ESTABLISH SSH CONNECTION FOR USER: centos
<Private_IP1> SSH: ansible.cfg set ssh_args: (-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
<Private_IP1> SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: (-o)(StrictHostKeyChecking=no)
<Private_IP1> SSH: ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: (-o)(IdentityFile=“/home/ubuntu/.ssh/MyKey.pem”)
<Private_IP1> SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<Private_IP1> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User=centos)
<Private_IP1> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
<Private_IP1> SSH: PlayContext set ssh_common_args: ()
<Private_IP1> SSH: PlayContext set ssh_extra_args: ()
<Private_IP1> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/ubuntu/.ansible/cp/ansible-ssh-%h-%p-%r)
<Private_IP1> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o ‘IdentityFile=“/home/ubuntu/.ssh/MyKey.pem”’ -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=centos -o ConnectTimeout=10 -o ControlPath=/home/ubuntu/.ansible/cp/ansible-ssh-%h-%p-%r -tt Private_IP1 ‘/bin/sh -c ‘"’“‘LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /home/centos/.ansible/tmp/ansible-tmp-1474528970.94-42038548997439/ping; rm -rf “/home/centos/.ansible/tmp/ansible-tmp-1474528970.94-42038548997439/” > /dev/null 2>&1 && sleep 0’”’“‘’
<Private_IP2> ESTABLISH SSH CONNECTION FOR USER: centos
<Private_IP2> SSH: ansible.cfg set ssh_args: (-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
<Private_IP2> SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: (-o)(StrictHostKeyChecking=no)
<Private_IP2> SSH: ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: (-o)(IdentityFile=”/home/ubuntu/.ssh/MyKey.pem")
<Private_IP2> SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<Private_IP2> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User=centos)
<Private_IP2> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
<Private_IP2> SSH: PlayContext set ssh_common_args: ()
<Private_IP2> SSH: PlayContext set ssh_extra_args: ()
<Private_IP2> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/ubuntu/.ansible/cp/ansible-ssh-%h-%p-%r)
<Private_IP2> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o ‘IdentityFile=“/home/ubuntu/.ssh/MyKey.pem”’ -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=centos -o ConnectTimeout=10 -o ControlPath=/home/ubuntu/.ansible/cp/ansible-ssh-%h-%p-%r -tt Private_IP2 ‘/bin/sh -c ‘"’“‘LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /home/centos/.ansible/tmp/ansible-tmp-1474528970.94-115245318606115/ping; rm -rf “/home/centos/.ansible/tmp/ansible-tmp-1474528970.94-115245318606115/” > /dev/null 2>&1 && sleep 0’”’“‘’
Private_IP1 | SUCCESS => {
“changed”: false,
“invocation”: {
“module_args”: {
“data”: null
},
“module_name”: “ping”
},
“ping”: “pong”
}
Private_IP2 | SUCCESS => {
“changed”: false,
“invocation”: {
“module_args”: {
“data”: null
},
“module_name”: “ping”
},
“ping”: “pong”
}
<Private_IP3> PUT /tmp/tmpQBmgof TO /home/centos/.ansible/tmp/ansible-tmp-1474528970.94-11790883317121/ping
<Private_IP3> SSH: ansible.cfg set ssh_args: (-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
<Private_IP3> SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: (-o)(StrictHostKeyChecking=no)
<Private_IP3> SSH: ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: (-o)(IdentityFile=”/home/ubuntu/.ssh/MyKey.pem")
<Private_IP3> SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<Private_IP3> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User=centos)
<Private_IP3> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
<Private_IP3> SSH: PlayContext set ssh_common_args: ()
<Private_IP3> SSH: PlayContext set sftp_extra_args: ()
<Private_IP3> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/ubuntu/.ansible/cp/ansible-ssh-%h-%p-%r)
<Private_IP3> SSH: EXEC sftp -b - -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o ‘IdentityFile=“/home/ubuntu/.ssh/MyKey.pem”’ -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=centos -o ConnectTimeout=10 -o ControlPath=/home/ubuntu/.ansible/cp/ansible-ssh-%h-%p-%r ‘[Private_IP3]’
<Private_IP3> ESTABLISH SSH CONNECTION FOR USER: centos
<Private_IP3> SSH: ansible.cfg set ssh_args: (-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
<Private_IP3> SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: (-o)(StrictHostKeyChecking=no)
<Private_IP3> SSH: ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: (-o)(IdentityFile=“/home/ubuntu/.ssh/MyKey.pem”)
<Private_IP3> SSH: ansible_password/ansible_ssh_pass not set: (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
<Private_IP3> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: (-o)(User=centos)
<Private_IP3> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
<Private_IP3> SSH: PlayContext set ssh_common_args: ()
<Private_IP3> SSH: PlayContext set ssh_extra_args: ()
<Private_IP3> SSH: found only ControlPersist; added ControlPath: (-o)(ControlPath=/home/ubuntu/.ansible/cp/ansible-ssh-%h-%p-%r)
<Private_IP3> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s -o StrictHostKeyChecking=no -o ‘IdentityFile=“/home/ubuntu/.ssh/MyKey.pem”’ -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=centos -o ConnectTimeout=10 -o ControlPath=/home/ubuntu/.ansible/cp/ansible-ssh-%h-%p-%r -tt Private_IP3 ‘/bin/sh -c ‘"’“‘LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8 /usr/bin/python /home/centos/.ansible/tmp/ansible-tmp-1474528970.94-11790883317121/ping; rm -rf “/home/centos/.ansible/tmp/ansible-tmp-1474528970.94-11790883317121/” > /dev/null 2>&1 && sleep 0’”’"‘’
Private_IP3 | SUCCESS => {
“changed”: false,
“invocation”: {
“module_args”: {
“data”: null
},
“module_name”: “ping”
},
“ping”: “pong”
}
`
Let me know if you find something.
Thanks again,
Nirav