I am trying to deploy on Fedora 18 (target) from my Mac with ansible version 1.4.3
I am trying to the following command where my ssh user is also my sudo user
ansible-playbook -i hosts ctas_install.yml -u preseed -K -U preseed -vvv
but I never ever see the command being executed as sudo in the debug… And it fails (trying to install simple package git)
192.168.222.131> ESTABLISH CONNECTION FOR USER: preseed
<192.168.222.131> EXEC [‘ssh’, ‘-tt’, ‘-q’, ‘-o’, ‘ControlMaster=auto’, ‘-o’, ‘ControlPersist=60s’, ‘-o’, ‘ControlPath=/Users/Emmanuel/.ansible/cp/ansible-ssh-%h-%p-%r’, ‘-o’, ‘Port=22’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘User=preseed’, ‘-o’, ‘ConnectTimeout=10’, ‘192.168.222.131’, “/bin/sh -c ‘mkdir -p /tmp/ansible-1391028097.46-71967857175139 && chmod a+rx /tmp/ansible-1391028097.46-71967857175139 && echo /tmp/ansible-1391028097.46-71967857175139’”]
<192.168.222.131> REMOTE_MODULE yum pkg=git state=latest
<192.168.222.131> PUT /var/folders/p3/05g7th9x4vzf_198t01mdtcr0000gp/T/tmp446O71 TO /tmp/ansible-1391028097.46-71967857175139/yum
<192.168.222.131> EXEC [‘ssh’, ‘-tt’, ‘-q’, ‘-o’, ‘ControlMaster=auto’, ‘-o’, ‘ControlPersist=60s’, ‘-o’, ‘ControlPath=/Users/Emmanuel/.ansible/cp/ansible-ssh-%h-%p-%r’, ‘-o’, ‘Port=22’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘User=preseed’, ‘-o’, ‘ConnectTimeout=10’, ‘192.168.222.131’, “/bin/sh -c ‘chmod a+r /tmp/ansible-1391028097.46-71967857175139/yum’”]
<192.168.222.131> EXEC [‘ssh’, ‘-tt’, ‘-q’, ‘-o’, ‘ControlMaster=auto’, ‘-o’, ‘ControlPersist=60s’, ‘-o’, ‘ControlPath=/Users/Emmanuel/.ansible/cp/ansible-ssh-%h-%p-%r’, ‘-o’, ‘Port=22’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘User=preseed’, ‘-o’, ‘ConnectTimeout=10’, ‘192.168.222.131’, “/bin/sh -c ‘/usr/bin/python -tt /tmp/ansible-1391028097.46-71967857175139/yum’”]
<192.168.222.131> EXEC [‘ssh’, ‘-tt’, ‘-q’, ‘-o’, ‘ControlMaster=auto’, ‘-o’, ‘ControlPersist=60s’, ‘-o’, ‘ControlPath=/Users/Emmanuel/.ansible/cp/ansible-ssh-%h-%p-%r’, ‘-o’, ‘Port=22’, ‘-o’, ‘KbdInteractiveAuthentication=no’, ‘-o’, ‘PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey’, ‘-o’, ‘PasswordAuthentication=no’, ‘-o’, ‘User=preseed’, ‘-o’, ‘ConnectTimeout=10’, ‘192.168.222.131’, “/bin/sh -c ‘rm -rf /tmp/ansible-1391028097.46-71967857175139/ >/dev/null 2>&1’”]
failed: [192.168.222.131] => {“changed”: false, “failed”: true, “item”: “”, “rc”: 1, “results”: [“Loaded plugins: langpacks, presto\n”]}
msg: You need to be root to perform this command.
But if execute without the -U , it tries as root and hangs…
what am I doing wrong?
Any idea