J'essaie ceci sur une instance EC2 d'AWS exécutant Ubuntu 14.04.
J'ai une tâche qui notifie un gestionnaire. Lorsque le gestionnaire est exécuté, j'obtiens une erreur. J'ai du mal à comprendre le message d'erreur et je ne peux donc pas le déboguer.
La tâche :
- name: Set post_max_size to 100M
sudo: yes
lineinfile: dest=/etc/php5/fpm/php.ini regexp='^;?post_max_size =' line='post_max_size = 100M'
notify:
- restart php5-fpm
Les manipulateurs
---
- name: start php5-fpm
service: name=php5-fpm state=started
- name: restart php5-fpm
service: name=php5-fpm state=restarted
L'erreur que je reçois
NOTIFIED: [php | restart php5-fpm] ********************************************
<54.154.82.195> ESTABLISH CONNECTION FOR USER: ubuntu
<54.154.82.195> REMOTE_MODULE service name=php5-fpm state=restarted
<54.154.82.195> EXEC ssh -C -tt -vvv -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r" -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=ubuntu -o ConnectTimeout=10 54.154.82.195 /bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1433866104.51-11364253366998 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1433866104.51-11364253366998 && echo $HOME/.ansible/tmp/ansible-tmp-1433866104.51-11364253366998'
<52.16.161.67> ESTABLISH CONNECTION FOR USER: ubuntu
<52.16.161.67> REMOTE_MODULE service name=php5-fpm state=restarted
<52.16.161.67> EXEC ssh -C -tt -vvv -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r" -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=ubuntu -o ConnectTimeout=10 52.16.161.67 /bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1433866104.51-159732570027917 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1433866104.51-159732570027917 && echo $HOME/.ansible/tmp/ansible-tmp-1433866104.51-159732570027917'
<52.16.161.67> PUT /tmp/tmpyZ8NZb TO /home/ubuntu/.ansible/tmp/ansible-tmp-1433866104.51-159732570027917/service
<54.154.82.195> PUT /tmp/tmp67pMQt TO /home/ubuntu/.ansible/tmp/ansible-tmp-1433866104.51-11364253366998/service
<52.16.161.67> EXEC ssh -C -tt -vvv -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r" -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=ubuntu -o ConnectTimeout=10 52.16.161.67 /bin/sh -c 'sudo -k && sudo -H -S -p "[sudo via ansible, key=pkjcazbngchlcujcryxpjhqvysuogqdq] password: " -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-pkjcazbngchlcujcryxpjhqvysuogqdq; LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /home/ubuntu/.ansible/tmp/ansible-tmp-1433866104.51-159732570027917/service; rm -rf /home/ubuntu/.ansible/tmp/ansible-tmp-1433866104.51-159732570027917/ >/dev/null 2>&1'"'"''
<54.154.82.195> EXEC ssh -C -tt -vvv -o ControlMaster=auto -o ControlPersist=60s -o ControlPath="/home/vagrant/.ansible/cp/ansible-ssh-%h-%p-%r" -o StrictHostKeyChecking=no -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=ubuntu -o ConnectTimeout=10 54.154.82.195 /bin/sh -c 'sudo -k && sudo -H -S -p "[sudo via ansible, key=kmaknhfrafsrngyemkpxdkifpezqbtui] password: " -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-kmaknhfrafsrngyemkpxdkifpezqbtui; LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /home/ubuntu/.ansible/tmp/ansible-tmp-1433866104.51-11364253366998/service; rm -rf /home/ubuntu/.ansible/tmp/ansible-tmp-1433866104.51-11364253366998/ >/dev/null 2>&1'"'"''
failed: [54.154.82.195] => {"failed": true}
failed: [52.16.161.67] => {"failed": true}