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.
>

-- 
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/0b546480-44e1-4fca-913e-aa55a9d63fa8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to