Hi,
I run ansible 1.7.2 under ubuntu 14.04 amd64
I made a playbook to upgrade only package that I added to a list.
( https://github.com/johan-chassaing/linux/blob/master/ansible/playbook/package_upgrade_list.yml )
So, I retrieve the list of every packages that need to be upgraded on my server, and it install the package when the result is matched with an entry of my list.
For my test I got 4 package that could be upgraded: apache2-mpm-worker apache2.2-bin apache2.2-common bash
If I do not insert the when condition, all packages are installed.
TASK: [Upgrade] ***************************************************************
<127.0.0.1> REMOTE_MODULE apt name=apache2-mpm-worker,apache2.2-bin,apache2.2-common,bash state=latest
changed: [127.0.0.1] => (item=apache2-mpm-worker,apache2.2-bin,apache2.2-common,bash) => {“changed”: true, "
If I add the when condition, install is skipped.
TASK: [Upgrade] ***************************************************************
skipping: [127.0.0.1] => (item=apache2-mpm-worker,apache2.2-bin,apache2.2-common)
PLAY RECAP
127.0.0.1 : ok=3 changed=1 unreachable=0 failed=0
If I replace the APT module with a message, only bash package is skipped.
TASK: [Upgrade] ***************************************************************
<127.0.0.1> ESTABLISH CONNECTION FOR USER: vagrant
ok: [127.0.0.1] => (item=apache2-mpm-worker) => {
“item”: “apache2-mpm-worker”,
“msg”: “Package to update:apache2-mpm-worker”
}
<127.0.0.1> ESTABLISH CONNECTION FOR USER: vagrant
ok: [127.0.0.1] => (item=apache2.2-bin) => {
“item”: “apache2.2-bin”,
“msg”: “Package to update:apache2.2-bin”
}
<127.0.0.1> ESTABLISH CONNECTION FOR USER: vagrant
ok: [127.0.0.1] => (item=apache2.2-common) => {
“item”: “apache2.2-common”,
“msg”: “Package to update:apache2.2-common”
}
skipping: [127.0.0.1] => (item=bash)
Do you have any information about that?
Or any tips how I can debug?
Thank you
Johan