On Wednesday, February 18, 2015 at 2:08:07 PM UTC+1, Adam Hamsik wrote:
>
>
>
> On Wednesday, February 18, 2015 at 6:36:39 AM UTC+1, Francisco Reyes wrote:
>>
>> I have this in a playbook
>>
>> - name: Install needed packages
>> apt: pkg={{ item }} state=latest
>> with_items:
>> - libxml2-dev
>> - libxslt-dev
>> - memcached
>> - uwsgi
>>
>>
>
> I can see same behaviour for following play which is quite similar
>
> # TODO: This is marked as changed even if no package is installed
> - name: Install dev ubuntu packages for jenkins
> sudo: yes
> apt:
> pkg={{item}}
> state=present
> with_items: ['libxml2-dev', 'libxslt-dev', 'zlib1g-dev']
> tags: install
>
> funny thing is that it doesn't happen for other packages. only for these
> 3.
>
>> Every single time it runs, it reports changed...
>> output with -vvvv
>>
>> TASK: [Install needed packages]
>>> ***********************************************
>>> <sp-web.clienthost.pw>
>>> <sp-web.clienthost.pw> state=latest
>>> pkg=libxml2-dev,libxslt-dev,memcached,uwsgi
>>> <sp-web.clienthost.pw> ConnectTimeout=10 PasswordAuthentication=no
>>> KbdInteractiveAuthentication=no User=root
>>> ControlPath=/home/francisco/.ansible/cp/ansible-ssh-%h-%p-%r
>>> PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey
>>> ControlMaster=auto Port=2222 ControlPersist=60s
>>> <sp-web.clienthost.pw>
>>> <sp-web.clienthost.pw> ConnectTimeout=10 PasswordAuthentication=no
>>> 'LANG=C LC_CTYPE=C /usr/bin/python
>>> /root/.ansible/tmp/ansible-tmp-1424237732.24-109662245491931/apt; rm -rf
>>> /root/.ansible/tmp/ansible-tmp-1424237732.24-109662245491931/ >/dev/null
>>> 2>&1' KbdInteractiveAuthentication=no User=root
>>> ControlPath=/home/francisco/.ansible/cp/ansible-ssh-%h-%p-%r
>>> PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey
>>> ControlMaster=auto Port=2222 ControlPersist=60s
>>> changed: [sp-web.clienthost.pw] =>
>>> (item=libxml2-dev,libxslt-dev,memcached,uwsgi) => {"changed": true, "item":
>>> "libxml2-dev,libxslt-dev,memcached,uwsgi", "stderr": "", "stdout": "Reading
>>> package lists...\nBuilding dependency tree...\nReading state
>>> information...\nlibxslt1-dev is already the newest version.\n0 upgraded, 0
>>> newly installed, 0 to remove and 0 not upgraded.\n"}
>>
>>
>>
>> Any ideas why it keeps reporting "changed".
>>
>> I tried checking if apt upgrade even reports anything in the target
>> machine and it doesn't.
>>
>
After some troubleshooting problem looks to be in libxslt-dev package
caracal:rsd_env_setup (master*) $ ansible -m apt -a 'pkg=libxslt-dev
state=present' opsci-server -s -vvv
<opsci.rsd.com> ESTABLISH CONNECTION FOR USER: rsd
<opsci.rsd.com> REMOTE_MODULE apt pkg=libxslt-dev state=present
<opsci.rsd.com> EXEC ssh -C -tt -q -o ControlPersist=15m -F
/Users/haad/.ansible/ssh_config -o
ControlPath="/Users/haad/.ansible/cp/ansible-ssh-%h-%p-%r" -o
StrictHostKeyChecking=no -o Port=22 -o
IdentityFile="/Users/haad/.ssh/id_rsa" -o KbdInteractiveAuthentication=no
-o
PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey
-o PasswordAuthentication=no -o User=rsd -o ConnectTimeout=19 opsci.rsd.com
/bin/sh -c 'mkdir -p
$HOME/.ansible/tmp/ansible-tmp-1424265035.78-99667925086072 && chmod a+rx
$HOME/.ansible/tmp/ansible-tmp-1424265035.78-99667925086072 && echo
$HOME/.ansible/tmp/ansible-tmp-1424265035.78-99667925086072'
<opsci.rsd.com> PUT
/var/folders/yq/_h9bmb6x1qxb7p4_w5xhkgx80000gn/T/tmpg9KHmA TO
/home/rsd/.ansible/tmp/ansible-tmp-1424265035.78-99667925086072/apt
<opsci.rsd.com> EXEC ssh -C -tt -q -o ControlPersist=15m -F
/Users/haad/.ansible/ssh_config -o
ControlPath="/Users/haad/.ansible/cp/ansible-ssh-%h-%p-%r" -o
StrictHostKeyChecking=no -o Port=22 -o
IdentityFile="/Users/haad/.ssh/id_rsa" -o KbdInteractiveAuthentication=no
-o
PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey
-o PasswordAuthentication=no -o User=rsd -o ConnectTimeout=19 opsci.rsd.com
/bin/sh -c 'sudo -k && sudo -H -S -p "[sudo via ansible,
key=cljxvustcsbxbaozbgaskderzvnjkymy] password: " -u root /bin/sh -c
'"'"'echo SUDO-SUCCESS-cljxvustcsbxbaozbgaskderzvnjkymy; LANG=C LC_CTYPE=C
/usr/bin/python
/home/rsd/.ansible/tmp/ansible-tmp-1424265035.78-99667925086072/apt; rm -rf
/home/rsd/.ansible/tmp/ansible-tmp-1424265035.78-99667925086072/ >/dev/null
2>&1'"'"''
opsci-server | success >> {
"changed": true,
"stderr": "",
"stdout": "Reading package lists...\nBuilding dependency
tree...\nReading state information...\nlibxslt1-dev is already the newest
version.\n0 upgraded, 0 newly installed, 0 to remove and 65 not upgraded.\n"
}
caracal:rsd_env_setup (master*) $ ansible -m apt -a 'pkg=libxml2-dev
state=present' opsci-server -s -vvv
<opsci.rsd.com> ESTABLISH CONNECTION FOR USER: rsd
<opsci.rsd.com> REMOTE_MODULE apt pkg=libxml2-dev state=present
<opsci.rsd.com> EXEC ssh -C -tt -q -o ControlPersist=15m -F
/Users/haad/.ansible/ssh_config -o
ControlPath="/Users/haad/.ansible/cp/ansible-ssh-%h-%p-%r" -o
StrictHostKeyChecking=no -o Port=22 -o
IdentityFile="/Users/haad/.ssh/id_rsa" -o KbdInteractiveAuthentication=no
-o
PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey
-o PasswordAuthentication=no -o User=rsd -o ConnectTimeout=19 opsci.rsd.com
/bin/sh -c 'mkdir -p
$HOME/.ansible/tmp/ansible-tmp-1424265055.72-134679118481702 && chmod a+rx
$HOME/.ansible/tmp/ansible-tmp-1424265055.72-134679118481702 && echo
$HOME/.ansible/tmp/ansible-tmp-1424265055.72-134679118481702'
<opsci.rsd.com> PUT
/var/folders/yq/_h9bmb6x1qxb7p4_w5xhkgx80000gn/T/tmpR6qy_K TO
/home/rsd/.ansible/tmp/ansible-tmp-1424265055.72-134679118481702/apt
<opsci.rsd.com> EXEC ssh -C -tt -q -o ControlPersist=15m -F
/Users/haad/.ansible/ssh_config -o
ControlPath="/Users/haad/.ansible/cp/ansible-ssh-%h-%p-%r" -o
StrictHostKeyChecking=no -o Port=22 -o
IdentityFile="/Users/haad/.ssh/id_rsa" -o KbdInteractiveAuthentication=no
-o
PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey
-o PasswordAuthentication=no -o User=rsd -o ConnectTimeout=19 opsci.rsd.com
/bin/sh -c 'sudo -k && sudo -H -S -p "[sudo via ansible,
key=dlcbjvxflyxkbuoiaomhxeyyczmpstws] password: " -u root /bin/sh -c
'"'"'echo SUDO-SUCCESS-dlcbjvxflyxkbuoiaomhxeyyczmpstws; LANG=C LC_CTYPE=C
/usr/bin/python
/home/rsd/.ansible/tmp/ansible-tmp-1424265055.72-134679118481702/apt; rm
-rf /home/rsd/.ansible/tmp/ansible-tmp-1424265055.72-134679118481702/
>/dev/null 2>&1'"'"''
opsci-server | success >> {
"changed": false
}
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/6522ac0f-b588-4da2-8cf8-4ec34e2f98c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.