Hi,
I'm just starting to use Ansible, right now with just a playbook for users 
and it was working as expected for just 1 run.

After that and without changes on the playbook(for real) it all hosts start 
failing with unreachable.  There was a change but it was not significant 
and I did roll it back and was just to create 2 groups insted of 1 in the 
inventory file.

I have setup the private_key_file in ansible.cfg and I'm specifying the 
user by command line, the host key verification is off which shouldn't 
matter since the host keys are already stored anyway.

All hosts are accesible by the specify user with the specify key via ssh, 
any help or suggestion is more than welcome.

Here is the output of the playbook run:

mleon  traveller02  ~  Development  ansible  $  ansible-playbook -u 
> ec2-user -i hosts playbooks/users.yml -vvvvv
> Using /etc/ansible/ansible.cfg as config file
> [DEPRECATION WARNING]: Instead of sudo/sudo_user, use become/become_user 
> and make sure become_method is 'sudo' (default).
> This feature will be removed in a future release. Deprecation warnings can 
> be disabled by setting deprecation_warnings=False in ansible.cfg.
> Loaded callback default of type stdout, v2.0
>
> PLAYBOOK: users.yml 
> ************************************************************
> 1 plays in playbooks/users.yml
>
> PLAY [all] 
> *********************************************************************
>
> TASK [setup] 
> *******************************************************************
> <ci-one> ESTABLISH SSH CONNECTION FOR USER: ec2-user
> <ci-one> SSH: ansible.cfg set ssh_args: 
> (-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
> <ci-one> SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: 
> (-o)(StrictHostKeyChecking=no)
> <ci-one> SSH: 
> ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: 
> (-o)(IdentityFile="/hoem/mleon/.ssh/hotchalk-chef.pem")
> <ci-one> SSH: ansible_password/ansible_ssh_pass not set: 
> (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
> <ci-one> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: 
> (-o)(User=ec2-user)
> <ci-one> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
> <ci-one> SSH: PlayContext set ssh_common_args: ()
> <ci-one> SSH: PlayContext set ssh_extra_args: ()
> <ci-one> SSH: found only ControlPersist; added ControlPath: 
> (-o)(ControlPath=/home/mleon/.ansible/cp/ansible-ssh-%h-%p-%r)
> <ci-one> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s 
> -o StrictHostKeyChecking=no -o 
> 'IdentityFile="/hoem/mleon/.ssh/hotchalk-chef.pem"' -o 
> KbdInteractiveAuthentication=no -o 
> PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey 
> -o PasswordAuthentication=no -o User=ec2-user -o ConnectTimeout=10 -o 
> ControlPath=/home/mleon/.ansible/cp/ansible-ssh-%h-%p-%r ci-one '/bin/sh -c 
> '"'"'( umask 22 && mkdir -p "` echo 
> $HOME/.ansible/tmp/ansible-tmp-1463174750.85-24592912549693 `" && echo "` 
> echo $HOME/.ansible/tmp/ansible-tmp-1463174750.85-24592912549693 `" )'"'"''
> <cassandra-qa-one> ESTABLISH SSH CONNECTION FOR USER: ec2-user
> <cassandra-qa-one> SSH: ansible.cfg set ssh_args: 
> (-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
> <cassandra-qa-one> SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking 
> disabled: (-o)(StrictHostKeyChecking=no)
> <cassandra-qa-one> SSH: 
> ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: 
> (-o)(IdentityFile="/hoem/mleon/.ssh/hotchalk-chef.pem")
> <cassandra-qa-one> SSH: ansible_password/ansible_ssh_pass not set: 
> (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
> <cassandra-qa-one> SSH: 
> ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: 
> (-o)(User=ec2-user)
> <cassandra-qa-one> SSH: ANSIBLE_TIMEOUT/timeout set: 
> (-o)(ConnectTimeout=10)
> <cassandra-qa-one> SSH: PlayContext set ssh_common_args: ()
> <cassandra-qa-one> SSH: PlayContext set ssh_extra_args: ()
> <cassandra-qa-one> SSH: found only ControlPersist; added ControlPath: 
> (-o)(ControlPath=/home/mleon/.ansible/cp/ansible-ssh-%h-%p-%r)
> <cassandra-qa-one> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o 
> ControlPersist=60s -o StrictHostKeyChecking=no -o 
> 'IdentityFile="/hoem/mleon/.ssh/hotchalk-chef.pem"' -o 
> KbdInteractiveAuthentication=no -o 
> PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey 
> -o PasswordAuthentication=no -o User=ec2-user -o ConnectTimeout=10 -o 
> ControlPath=/home/mleon/.ansible/cp/ansible-ssh-%h-%p-%r cassandra-qa-one 
> '/bin/sh -c '"'"'( umask 22 && mkdir -p "` echo 
> $HOME/.ansible/tmp/ansible-tmp-1463174750.86-100307403498629 `" && echo "` 
> echo $HOME/.ansible/tmp/ansible-tmp-1463174750.86-100307403498629 `" )'"'"''
> <cassandra-qa-three> ESTABLISH SSH CONNECTION FOR USER: ec2-user
> <cassandra-qa-three> SSH: ansible.cfg set ssh_args: 
> (-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
> <cassandra-qa-three> SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking 
> disabled: (-o)(StrictHostKeyChecking=no)
> <cassandra-qa-three> SSH: 
> ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: 
> (-o)(IdentityFile="/hoem/mleon/.ssh/hotchalk-chef.pem")
> <cassandra-qa-three> SSH: ansible_password/ansible_ssh_pass not set: 
> (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
> <cassandra-qa-three> SSH: 
> ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: 
> (-o)(User=ec2-user)
> <cassandra-qa-three> SSH: ANSIBLE_TIMEOUT/timeout set: 
> (-o)(ConnectTimeout=10)
> <cassandra-qa-three> SSH: PlayContext set ssh_common_args: ()
> <cassandra-qa-two> ESTABLISH SSH CONNECTION FOR USER: ec2-user
> <cassandra-qa-two> SSH: ansible.cfg set ssh_args: 
> (-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
> <cassandra-qa-two> SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking 
> disabled: (-o)(StrictHostKeyChecking=no)
> <cassandra-qa-two> SSH: 
> ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: 
> (-o)(IdentityFile="/hoem/mleon/.ssh/hotchalk-chef.pem")
> <cassandra-qa-two> SSH: ansible_password/ansible_ssh_pass not set: 
> (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
> <cassandra-qa-two> SSH: 
> ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: 
> (-o)(User=ec2-user)
> <cassandra-qa-two> SSH: ANSIBLE_TIMEOUT/timeout set: 
> (-o)(ConnectTimeout=10)
> <cassandra-qa-two> SSH: PlayContext set ssh_common_args: ()
> <vpn.hotchalkember.com> ESTABLISH SSH CONNECTION FOR USER: ec2-user
> <cassandra-qa-two> SSH: PlayContext set ssh_extra_args: ()
> <vpn.hotchalkember.com> SSH: ansible.cfg set ssh_args: 
> (-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
> <vpn.hotchalkember.com> SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking 
> disabled: (-o)(StrictHostKeyChecking=no)
> <vpn.hotchalkember.com> SSH: 
> ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: 
> (-o)(IdentityFile="/hoem/mleon/.ssh/hotchalk-chef.pem")
> <vpn.hotchalkember.com> SSH: ansible_password/ansible_ssh_pass not set: 
> (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
> <vpn.hotchalkember.com> SSH: 
> ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: 
> (-o)(User=ec2-user)
> <vpn.hotchalkember.com> SSH: ANSIBLE_TIMEOUT/timeout set: 
> (-o)(ConnectTimeout=10)
> <vpn.hotchalkember.com> SSH: PlayContext set ssh_common_args: ()
> <cassandra-qa-two> SSH: found only ControlPersist; added ControlPath: 
> (-o)(ControlPath=/home/mleon/.ansible/cp/ansible-ssh-%h-%p-%r)
> <vpn.hotchalkember.com> SSH: PlayContext set ssh_extra_args: ()
> <cassandra-qa-two> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o 
> ControlPersist=60s -o StrictHostKeyChecking=no -o 
> 'IdentityFile="/hoem/mleon/.ssh/hotchalk-chef.pem"' -o 
> KbdInteractiveAuthentication=no -o 
> PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey 
> -o PasswordAuthentication=no -o User=ec2-user -o ConnectTimeout=10 -o 
> ControlPath=/home/mleon/.ansible/cp/ansible-ssh-%h-%p-%r cassandra-qa-two 
> '/bin/sh -c '"'"'( umask 22 && mkdir -p "` echo 
> $HOME/.ansible/tmp/ansible-tmp-1463174750.87-141641794147552 `" && echo "` 
> echo $HOME/.ansible/tmp/ansible-tmp-1463174750.87-141641794147552 `" )'"'"''
> <vpn.hotchalkember.com> SSH: found only ControlPersist; added ControlPath: 
> (-o)(ControlPath=/home/mleon/.ansible/cp/ansible-ssh-%h-%p-%r)
> <vpn.hotchalkember.com> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o 
> ControlPersist=60s -o StrictHostKeyChecking=no -o 
> 'IdentityFile="/hoem/mleon/.ssh/hotchalk-chef.pem"' -o 
> KbdInteractiveAuthentication=no -o 
> PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey 
> -o PasswordAuthentication=no -o User=ec2-user -o ConnectTimeout=10 -o 
> ControlPath=/home/mleon/.ansible/cp/ansible-ssh-%h-%p-%r 
> vpn.hotchalkember.com '/bin/sh -c '"'"'( umask 22 && mkdir -p "` echo 
> $HOME/.ansible/tmp/ansible-tmp-1463174750.88-195355820109546 `" && echo "` 
> echo $HOME/.ansible/tmp/ansible-tmp-1463174750.88-195355820109546 `" )'"'"''
> <cassandra-qa-three> SSH: PlayContext set ssh_extra_args: ()
> <cassandra-qa-three> SSH: found only ControlPersist; added ControlPath: 
> (-o)(ControlPath=/home/mleon/.ansible/cp/ansible-ssh-%h-%p-%r)
> <cassandra-qa-three> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o 
> ControlPersist=60s -o StrictHostKeyChecking=no -o 
> 'IdentityFile="/hoem/mleon/.ssh/hotchalk-chef.pem"' -o 
> KbdInteractiveAuthentication=no -o 
> PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey 
> -o PasswordAuthentication=no -o User=ec2-user -o ConnectTimeout=10 -o 
> ControlPath=/home/mleon/.ansible/cp/ansible-ssh-%h-%p-%r cassandra-qa-three 
> '/bin/sh -c '"'"'( umask 22 && mkdir -p "` echo 
> $HOME/.ansible/tmp/ansible-tmp-1463174750.87-10863234365179 `" && echo "` 
> echo $HOME/.ansible/tmp/ansible-tmp-1463174750.87-10863234365179 `" )'"'"''
> fatal: [ci-one]: UNREACHABLE! => {"changed": false, "msg": "Failed to 
> connect to the host via ssh.", "unreachable": true}
> <chef-server12> ESTABLISH SSH CONNECTION FOR USER: ec2-user
> <chef-server12> SSH: ansible.cfg set ssh_args: 
> (-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
> <chef-server12> SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: 
> (-o)(StrictHostKeyChecking=no)
> <chef-server12> SSH: 
> ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: 
> (-o)(IdentityFile="/hoem/mleon/.ssh/hotchalk-chef.pem")
> <chef-server12> SSH: ansible_password/ansible_ssh_pass not set: 
> (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
> <chef-server12> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u 
> set: (-o)(User=ec2-user)
> <chef-server12> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
> <chef-server12> SSH: PlayContext set ssh_common_args: ()
> <chef-server12> SSH: PlayContext set ssh_extra_args: ()
> <chef-server12> SSH: found only ControlPersist; added ControlPath: 
> (-o)(ControlPath=/home/mleon/.ansible/cp/ansible-ssh-%h-%p-%r)
> <chef-server12> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o 
> ControlPersist=60s -o StrictHostKeyChecking=no -o 
> 'IdentityFile="/hoem/mleon/.ssh/hotchalk-chef.pem"' -o 
> KbdInteractiveAuthentication=no -o 
> PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey 
> -o PasswordAuthentication=no -o User=ec2-user -o ConnectTimeout=10 -o 
> ControlPath=/home/mleon/.ansible/cp/ansible-ssh-%h-%p-%r chef-server12 
> '/bin/sh -c '"'"'( umask 22 && mkdir -p "` echo 
> $HOME/.ansible/tmp/ansible-tmp-1463174751.67-14805759103648 `" && echo "` 
> echo $HOME/.ansible/tmp/ansible-tmp-1463174751.67-14805759103648 `" )'"'"''
> <con-tunnel-1> ESTABLISH SSH CONNECTION FOR USER: ec2-user
> <con-tunnel-1> SSH: ansible.cfg set ssh_args: 
> (-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
> <con-tunnel-1> SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: 
> (-o)(StrictHostKeyChecking=no)
> <con-tunnel-1> SSH: 
> ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: 
> (-o)(IdentityFile="/hoem/mleon/.ssh/hotchalk-chef.pem")
> <con-tunnel-1> SSH: ansible_password/ansible_ssh_pass not set: 
> (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
> <con-tunnel-1> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u 
> set: (-o)(User=ec2-user)
> <con-tunnel-1> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
> <con-tunnel-1> SSH: PlayContext set ssh_common_args: ()
> <con-tunnel-1> SSH: PlayContext set ssh_extra_args: ()
> <con-tunnel-1> SSH: found only ControlPersist; added ControlPath: 
> (-o)(ControlPath=/home/mleon/.ansible/cp/ansible-ssh-%h-%p-%r)
> <con-tunnel-1> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o 
> ControlPersist=60s -o StrictHostKeyChecking=no -o 
> 'IdentityFile="/hoem/mleon/.ssh/hotchalk-chef.pem"' -o 
> KbdInteractiveAuthentication=no -o 
> PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey 
> -o PasswordAuthentication=no -o User=ec2-user -o ConnectTimeout=10 -o 
> ControlPath=/home/mleon/.ansible/cp/ansible-ssh-%h-%p-%r con-tunnel-1 
> '/bin/sh -c '"'"'( umask 22 && mkdir -p "` echo 
> $HOME/.ansible/tmp/ansible-tmp-1463174751.69-198793441575299 `" && echo "` 
> echo $HOME/.ansible/tmp/ansible-tmp-1463174751.69-198793441575299 `" )'"'"''
> fatal: [vpn.hotchalkember.com]: UNREACHABLE! => {"changed": false, "msg": 
> "Failed to connect to the host via ssh.", "unreachable": true}
> fatal: [cassandra-qa-one]: UNREACHABLE! => {"changed": false, "msg": 
> "Failed to connect to the host via ssh.", "unreachable": true}
> fatal: [cassandra-qa-two]: UNREACHABLE! => {"changed": false, "msg": 
> "Failed to connect to the host via ssh.", "unreachable": true}
> fatal: [cassandra-qa-three]: UNREACHABLE! => {"changed": false, "msg": 
> "Failed to connect to the host via ssh.", "unreachable": true}
> <admin> ESTABLISH SSH CONNECTION FOR USER: ec2-user
> <admin> SSH: ansible.cfg set ssh_args: 
> (-o)(ControlMaster=auto)(-o)(ControlPersist=60s)
> <admin> SSH: ANSIBLE_HOST_KEY_CHECKING/host_key_checking disabled: 
> (-o)(StrictHostKeyChecking=no)
> <admin> SSH: 
> ANSIBLE_PRIVATE_KEY_FILE/private_key_file/ansible_ssh_private_key_file set: 
> (-o)(IdentityFile="/hoem/mleon/.ssh/hotchalk-chef.pem")
> <admin> SSH: ansible_password/ansible_ssh_pass not set: 
> (-o)(KbdInteractiveAuthentication=no)(-o)(PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey)(-o)(PasswordAuthentication=no)
> <admin> SSH: ANSIBLE_REMOTE_USER/remote_user/ansible_user/user/-u set: 
> (-o)(User=ec2-user)
> <admin> SSH: ANSIBLE_TIMEOUT/timeout set: (-o)(ConnectTimeout=10)
> <admin> SSH: PlayContext set ssh_common_args: ()
> <admin> SSH: PlayContext set ssh_extra_args: ()
> <admin> SSH: found only ControlPersist; added ControlPath: 
> (-o)(ControlPath=/home/mleon/.ansible/cp/ansible-ssh-%h-%p-%r)
> <admin> SSH: EXEC ssh -C -vvv -o ControlMaster=auto -o ControlPersist=60s 
> -o StrictHostKeyChecking=no -o 
> 'IdentityFile="/hoem/mleon/.ssh/hotchalk-chef.pem"' -o 
> KbdInteractiveAuthentication=no -o 
> PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey 
> -o PasswordAuthentication=no -o User=ec2-user -o ConnectTimeout=10 -o 
> ControlPath=/home/mleon/.ansible/cp/ansible-ssh-%h-%p-%r admin '/bin/sh -c 
> '"'"'( umask 22 && mkdir -p "` echo 
> $HOME/.ansible/tmp/ansible-tmp-1463174751.72-100746796851493 `" && echo "` 
> echo $HOME/.ansible/tmp/ansible-tmp-1463174751.72-100746796851493 `" )'"'"''
> fatal: [con-tunnel-1]: UNREACHABLE! => {"changed": false, "msg": "Failed 
> to connect to the host via ssh.", "unreachable": true}
> fatal: [chef-server12]: UNREACHABLE! => {"changed": false, "msg": "Failed 
> to connect to the host via ssh.", "unreachable": true}
> fatal: [admin]: UNREACHABLE! => {"changed": false, "msg": "Failed to 
> connect to the host via ssh.", "unreachable": true}
>     to retry, use: --limit @playbooks/users.retry
>
> PLAY RECAP 
> *********************************************************************
> admin                      : ok=0    changed=0    unreachable=1    
> failed=0   
> cassandra-qa-one           : ok=0    changed=0    unreachable=1    
> failed=0   
> cassandra-qa-three         : ok=0    changed=0    unreachable=1    
> failed=0   
> cassandra-qa-two           : ok=0    changed=0    unreachable=1    
> failed=0   
> chef-server12              : ok=0    changed=0    unreachable=1    
> failed=0   
> ci-one                     : ok=0    changed=0    unreachable=1    
> failed=0   
> con-tunnel-1               : ok=0    changed=0    unreachable=1    
> failed=0   
>
>> vpn.hotchalkember.com      : ok=0    changed=0    unreachable=1    
>> failed=0
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/e3aa5b06-89ed-4b7b-83ae-a531b6218cc1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to