I must be missing something really obvious but cant seem to manage copying
a repo file in place. The playbook is so simple I am not sure where to
start. Here is the output of some -vvvv action:

[root@localhost ansible]# ansible-playbook -vvvv -i hosts-test.ini
>>> playbook-sensu.yml
>>
>>
>>> PLAY [sensu-server]
>>> *********************************************************
>>
>>
>>> GATHERING FACTS
>>> ***************************************************************
>>
>> <192.168.110.64> ESTABLISH CONNECTION FOR USER: centos
>>
>> <192.168.110.64> REMOTE_MODULE setup
>>
>> <192.168.110.64> EXEC ssh -C -tt -vvv -o ControlMaster=auto
>>> -o ControlPersist=60s -o
>>> ControlPath="/root/.ansible/cp/ansible-ssh-%h-%p-%r" -o
>>> StrictHostKeyChecking=no -o IdentityFile="/root/.ssh/machine.pem" -o
>>> KbdInteractiveAuthentication=no -o
>>> PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey
>>> -o PasswordAuthentication=no -o User=centos
>>> -o ConnectTimeout=10 192.168.110.64 /bin/sh -c 'mkdir
>>> -p $HOME/.ansible/tmp/ansible-tmp-1439752997.23-250870364991127 && chmod
>>> a+rx $HOME/.ansible/tmp/ansible-tmp-1439752997.23-250870364991127 &&
>>> echo $HOME/.ansible/tmp/ansible-tmp-1439752997.23-250870364991127'
>>
>> <192.168.110.64> PUT /tmp/tmpvRMQe1
>>> TO /home/centos/.ansible/tmp/ansible-tmp-1439752997.23-250870364991127/setup
>>
>> <192.168.110.64> EXEC ssh -C -tt -vvv -o ControlMaster=auto
>>> -o ControlPersist=60s -o
>>> ControlPath="/root/.ansible/cp/ansible-ssh-%h-%p-%r" -o
>>> StrictHostKeyChecking=no -o IdentityFile="/root/.ssh/machine.pem" -o
>>> KbdInteractiveAuthentication=no -o
>>> PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey
>>> -o PasswordAuthentication=no -o User=centos
>>> -o ConnectTimeout=10 192.168.110.64 /bin/sh -c 'sudo -k && sudo -H -S -p
>>> "[sudo via ansible, key=jynbxwsfdeohvvupaxefxoirnkumswgr] password: " -u
>>> root /bin/sh -c '"'"'echo BECOME-SUCCESS-jynbxwsfdeohvvupaxefxoirnkumswgr;
>>> LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8
>>> /usr/bin/python 
>>> /home/centos/.ansible/tmp/ansible-tmp-1439752997.23-250870364991127/setup; 
>>> rm
>>> -rf /home/centos/.ansible/tmp/ansible-tmp-1439752997.23-250870364991127/ 
>>> >/dev/null 2>&1'"'"''
>>
>> ok: [192.168.110.64]
>>
>>
>>> TASK: [sensu | Copy Sensu Repo configuration file]
>>> **************************
>>
>> <192.168.110.64> ESTABLISH CONNECTION FOR USER: centos
>>
>> <192.168.110.64> REMOTE_MODULE file src=sensu.repo
>>> dest=/etc/yum.repos.d/sensu.repo owner=root group=root
>>
>> <192.168.110.64> EXEC ssh -C -tt -vvv -o ControlMaster=auto
>>> -o ControlPersist=60s -o
>>> ControlPath="/root/.ansible/cp/ansible-ssh-%h-%p-%r" -o
>>> StrictHostKeyChecking=no -o IdentityFile="/root/.ssh/machine.pem" -o
>>> KbdInteractiveAuthentication=no -o
>>> PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey
>>> -o PasswordAuthentication=no -o User=centos
>>> -o ConnectTimeout=10 192.168.110.64 /bin/sh -c 'mkdir
>>> -p $HOME/.ansible/tmp/ansible-tmp-1439752998.61-257891007893734 && chmod
>>> a+rx $HOME/.ansible/tmp/ansible-tmp-1439752998.61-257891007893734 &&
>>> echo $HOME/.ansible/tmp/ansible-tmp-1439752998.61-257891007893734'
>>
>> <192.168.110.64> PUT /tmp/tmpqYdiro
>>> TO /home/centos/.ansible/tmp/ansible-tmp-1439752998.61-257891007893734/file
>>
>> <192.168.110.64> EXEC ssh -C -tt -vvv -o ControlMaster=auto
>>> -o ControlPersist=60s -o
>>> ControlPath="/root/.ansible/cp/ansible-ssh-%h-%p-%r" -o
>>> StrictHostKeyChecking=no -o IdentityFile="/root/.ssh/machine.pem" -o
>>> KbdInteractiveAuthentication=no -o
>>> PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey
>>> -o PasswordAuthentication=no -o User=centos
>>> -o ConnectTimeout=10 192.168.110.64 /bin/sh -c 'sudo -k && sudo -H -S -p
>>> "[sudo via ansible, key=zttsegrxwbsozarymjbqavsmkvrbbbkn] password: " -u
>>> root /bin/sh -c '"'"'echo BECOME-SUCCESS-zttsegrxwbsozarymjbqavsmkvrbbbkn;
>>> LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8
>>> /usr/bin/python 
>>> /home/centos/.ansible/tmp/ansible-tmp-1439752998.61-257891007893734/file; rm
>>> -rf /home/centos/.ansible/tmp/ansible-tmp-1439752998.61-257891007893734/ 
>>> >/dev/null 2>&1'"'"''
>>
>> failed: [192.168.110.64] => {"failed": true, "path":
>>> "/etc/yum.repos.d/sensu.repo", "state": "absent"}
>>
>> msg: file (/etc/yum.repos.d/sensu.repo) is absent, cannot continue
>>
>>
>>> FATAL: all hosts have already failed -- aborting
>>
>>
>>> PLAY RECAP
>>> ********************************************************************
>>
>>            to retry, use: --limit @/root/playbook-sensu.retry
>>
>>
>>> 192.168.110.64             : ok=1    changed=0    unreachable=0
>>>  failed=1
>>
>>
Relevant ansible.cfg file:

[root@localhost ansible]# cat ansible.cfg

[defaults]

host_key_checking = False

remote_user = centos

sudo = true

private_key_file=~/.ssh/machine.pem




This is a CentOS 7.1 machine if it makes any difference. Any ideas?

-- 
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-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAKsMCERcu0-B31o52UJjeBOTsy8-WEkpX%3DmiGka9po7hqRf-8w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to