Eu queria copiar um arquivo gerado no hostA para servidores de produção e tentei a tarefa abaixo, mas o Ansible trava. Eu defino ssh_args=-i ForwardAgent=yes
como é sugerido no post anterior mas isso não tem efeito. Qual é o problema aqui?
- name: Copy certificate from hostA to production servers
synchronize:
mode: pull
src: /etc/td-agent/ca_cert.pem
dest: /etc/td-agent/ca_cert.pem
delegate_to: "{{item}}"
with_items: groups.production
UPDATE: o log é o seguinte:
TASK: [td-agent | Copy certificate to sender]
<192.168.50.3> ESTABLISH CONNECTION FOR USER: foo
<192.168.50.3> EXEC ssh -C -tt -vvv -o ForwardAgent=yes -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=foo -o ConnectTimeout=10 192.168.50.3 /bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1441765316.04-268038164469731 && chmod a+rx $HOME/.ansible/tmp/ansible-tmp-1441765316.04-268038164469731 && echo $HOME/.ansible/tmp/ansible-tmp-1441765316.04-268038164469731'
<192.168.50.3> PUT /tmp/user/1000/tmpocwPOc TO /home/foo/.ansible/tmp/ansible-tmp-1441765316.04-268038164469731/synchronize
<192.168.50.3> EXEC ssh -C -tt -vvv -o ForwardAgent=yes -o KbdInteractiveAuthentication=no -o PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey -o PasswordAuthentication=no -o User=foo -o ConnectTimeout=10 192.168.50.3 /bin/sh -c 'sudo -k && sudo -H -S -p "[sudo via ansible, key=wklthazqaiqrywuyoafjdpxwmqrpklyt] password: " -u root /bin/sh -c '"'"'echo BECOME-SUCCESS-wklthazqaiqrywuyoafjdpxwmqrpklyt; LANG=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 /usr/bin/python /home/kuma/.ansible/tmp/ansible-tmp-1441765316.04-268038164469731/synchronize; rm -rf /home/foo/.ansible/tmp/ansible-tmp-1441765316.04-268038164469731/ >/dev/null 2>&1'"'"''