[Klug-general] Ansible

Dan Attwood danattwood at gmail.com
Mon Feb 2 10:52:57 UTC 2015


After Kevins talk at the last klug I've been having another play with
ansible.

I've got my list of hosts set up and I've exported my ssh key from my
ansible server to them.

I can do:


ansible all -m ping vvvv

and they all ping and check fine.


when I run my playbook though (That checks for and applies updates) it runs
through the gathering facts section and then just sits on the last host;



<10.0.100.99> ESTABLISH CONNECTION FOR USER: administrator
<10.0.100.99> REMOTE_MODULE setup
<10.0.100.99> EXEC ssh -C -tt -vvv -o ControlMaster=auto -o
ControlPersist=60s -o
ControlPath="/home/administrator/.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=administrator -o ConnectTimeout=10
10.0.100.99 /bin/sh -c 'mkdir -p
$HOME/.ansible/tmp/ansible-tmp-1422870360.74-45757553727916 && chmod a+rx
$HOME/.ansible/tmp/ansible-tmp-1422870360.74-45757553727916 && echo
$HOME/.ansible/tmp/ansible-tmp-1422870360.74-45757553727916'
<10.0.100.99> PUT /tmp/tmpaGcn6F TO
/home/administrator/.ansible/tmp/ansible-tmp-1422870360.74-45757553727916/setup
<10.0.100.99> EXEC ssh -C -tt -vvv -o ControlMaster=auto -o
ControlPersist=60s -o
ControlPath="/home/administrator/.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=administrator -o ConnectTimeout=10
10.0.100.99 /bin/sh -c 'sudo -k && sudo -H -S -p "[sudo via ansible,
key=qwqneiukdxvgdklcqsbekawxtfyrcfaw] password: " -u root /bin/sh -c
'"'"'echo SUDO-SUCCESS-qwqneiukdxvgdklcqsbekawxtfyrcfaw; LANG=C LC_CTYPE=C
/usr/bin/python
/home/administrator/.ansible/tmp/ansible-tmp-1422870360.74-45757553727916/setup;
rm -rf
/home/administrator/.ansible/tmp/ansible-tmp-1422870360.74-45757553727916/
>/dev/null 2>&1'"'"''
ok: [10.0.100.99]



and thats it - now moving on to apply the next sections.

And ideas anyone - by which I mean Kevin :-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/kent/attachments/20150202/0b0861a9/attachment.html>


More information about the Kent mailing list