[root@localhost ansible]# ansible-playbook -vvvv -i hosts-test.ini playbook-sensu.ymlPLAY [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 continueFATAL: all hosts have already failed -- abortingPLAY RECAP ********************************************************************to retry, use: --limit @/root/playbook-sensu.retry192.168.110.64 : ok=1 changed=0 unreachable=0 failed=1
[root@localhost ansible]# cat ansible.cfg
[defaults]
host_key_checking = False
remote_user = centos
sudo = true
private_key_file=~/.ssh/machine.pem
hosts-test.ini playbook-sensu.yml
roles/ sensu/ tasks/ main.yml templates/ files/ sensu.repo
I call as:
ansible-playbook -vvvv -i hosts-test.ini playbook-sensu.yml
---- name: Copy Sensu Repo configuration file
file: src=sensu.repo dest=/etc/yum.repos.d/sensu.repo owner=root group=root
- name: Install Sensu and Dependenciesyum: name={{ item }} state=latestwith_items:- erlang- redis- sensu- name: Install rabbitmqyum: name=https://www.rabbitmq.com/releases/rabbitmq-server/v3.5.4/rabbitmq-server-3.5.4-1.noarch.rpm state=present- name: Ensure RabbitMQ running and starts during bootservice: name=rabbitmq-server enabled=yes state=restarted- name: create rabbitmq vhost by handrabbitmq_vhost: name=/sensu state=present- name: create rabbitmq stuff by handrabbitmq_user: user=sensu password=sensu vhost=/sensu configure_priv=.* read_priv=.* write_priv=.*- name: ensure redis is up and starts on bootservice: name=redis enabled=yes state=started- name: Copy Sensu config.jsonfile: src=sensu-server-config.json dest=/etc/sensu/config.json- name: Copy memcheckfile: src=check_memory.json dest=/etc/sensu/conf.d/check_memory.json- name: Copy default_handlerfile: src=default_handler.json dest=/etc/sensu/conf.d/default_handler.json- name: Ensure sensu owns filesfile: path=/etc/sensu owner=sensu group=sensu recurse=yes- name: Start sensu servicesservice: name={{ item }} enabled=yes state=startedwith_items:- sensu- sensu-apiIf I comment out the repo copy it continues on until the other copies fail. Those files are there, just didnt type them out above. Thanks for the help
Brian Coca
--
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/CAJ5XC8kVO0trkwwayf1YeFLObBkEmv2oCP3fzUePyjatRDdeWQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Brian Coca
--
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/CAJ5XC8kw-vUqyK4Dz_23aFikdUi-QGm%3D7hLrObLV7Qkm3Y-NPg%40mail.gmail.com.