Ansible Failed to Run because of SSH

128 views
Skip to first unread message

GBANE FETIGUE

unread,
Oct 13, 2015, 10:33:45 AM10/13/15
to Ansible Project
Hey Guys I am trying to run that playbook but for some reason it's not running

root@ip-172-16-20-180:/var/
lib/jenkins/jobs/build-cs-utils/workspace/playbooks# ansible-playbook -i inventory/prod deploy_system_status.yml
Enter the version you want to deploy:

PLAY [Deploy to status  servers] **********************************************

GATHERING FACTS ***************************************************************
fatal: [prodstatus0] => SSH Error: Permission denied (publickey).
    while connecting to 172.16.21.129:22
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.

TASK: [nodejs_app | Put upstart script in place] ******************************
FATAL: no hosts matched or all hosts have already failed -- aborting


PLAY RECAP ********************************************************************
           to retry, use: --limit @/root/deploy_system_status.retry

prodstatus0                : ok=0    changed=0    unreachable=1    failed=0 

Here is also the command with  -vvvv

root@ip-172-16-20-180:/var/lib/jenkins/jobs/build-cs-utils/workspace/playbooks# ansible-playbook -i inventory/prod deploy_system_status.yml -vvvv
Enter the version you want to deploy:

PLAY [Deploy to status  servers] **********************************************

GATHERING FACTS ***************************************************************
<172.16.21.129> ESTABLISH CONNECTION FOR USER: ansible
<172.16.21.129> REMOTE_MODULE setup
<172.16.21.129> EXEC ssh -C -tt -vvv -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/root/.ansible/cp/ansible-ssh-%h-%p-%r" -o IdentityFile="/root/credentials/ansible_id_rsa" -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=ansible -o ConnectTimeout=10 172.16.21.129 /bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1444673619.82-165283189134845 && echo $HOME/.ansible/tmp/ansible-tmp-1444673619.82-165283189134845'
fatal: [prodstatus0] => SSH Error: Permission denied (publickey).
    while connecting to 172.16.21.129:22
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.

TASK: [nodejs_app | Put upstart script in place] ******************************
FATAL: no hosts matched or all hosts have already failed -- aborting


PLAY RECAP ********************************************************************
           to retry, use: --limit @/root/deploy_system_status.retry

prodstatus0                : ok=0    changed=0    unreachable=1    failed=0  

Andrey Fesenko

unread,
Oct 13, 2015, 12:49:41 PM10/13/15
to Ansible Project
On Tuesday, October 13, 2015 at 5:33:45 PM UTC+3, GBANE FETIGUE wrote:
Hey Guys I am trying to run that playbook but for some reason it's not running
....

fatal: [prodstatus0] => SSH Error: Permission denied (publickey).


See http://docs.ansible.com/ansible/intro_getting_started.html
"Ansible by default assumes you are using SSH keys. SSH keys are encouraged but password authentication can also be used where needed by supplying the option --ask-pass"

GBANE FETIGUE

unread,
Oct 13, 2015, 3:06:04 PM10/13/15
to Ansible Project
Still not working

Mauricio Tavares

unread,
Oct 13, 2015, 3:10:18 PM10/13/15
to ansible...@googlegroups.com
On Tue, Oct 13, 2015 at 3:06 PM, GBANE FETIGUE <bem...@gmail.com> wrote:
> Still not working
>
You might want to elaborate.
> --
> 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 ansible-proje...@googlegroups.com.
> To post to this group, send email to ansible...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/a0690019-1b99-40af-9832-85dd498519d3%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages