[Wolves] ansible issue

Peter Cannon dick_turpin at archlinux.us
Tue Jun 23 19:12:41 UTC 2015


On 23/06/15 20:06, David Goodwin wrote:
> My thoughts :
> 
> a. I think you can run ansible with -v or -vvv to give you an idea of 
> what it's problem is.
> 
> b. What's your hosts file containing?
> 
> c. Why not use the 'apt' module -- ansible all -s -m apt -a state=latest
> 
> e.g.
> 
> walnut:~/src/ansible$ ansible -i ./hosts orange -s -m apt -a update=yes
> orange | FAILED >> {
>      "failed": true,
>      "msg": "[sudo via ansible, key=qgndmwdbfnqiufaqhetbmnzoolsjmjcs] 
> password: Sorry, try again.\n[sudo via ansible, 
> key=qgndmwdbfnqiufaqhetbmnzoolsjmjcs] password: Sorry, try again.\n[sudo 
> via ansible, key=qgndmwdbfnqiufaqhetbmnzoolsjmjcs] password: Sorry, try 
> again.\nsudo: 3 incorrect password attempts\n",
>      "parsed": false
> }
> 
> (fails, as I don't have sudo on 'orange')
> 
> 
> and
> 
> ansible -i ./hosts orange -u root -m apt -a "state=latest update_cache=yes"
> 
> orange | success >> {
>      "changed": false
> }
> 
> (connecting as 'root' .... )
> 
> http://docs.ansible.com/apt_module.html
> 
> (I admit I'm not being truly helpful ... but 'ansible -v' needs to be a 
> starting point, surely?)
> 

Sorted (Not fixed mind) it would seem there is a bug in ansible 1.9 https://github.com/ansible/ansible/issues/10891 the work around is to add -K to the command e.g. ansible -K all -s -m shell -a 'apt-get -y update'

I can confirm it works. Thanks Dave.



More information about the Wolves mailing list