Hi

I have ansible 2.6.5 and I notice one strange think. If I use hard code 
path for  "item.dest"  then reports no changed. Change is reported only if 
I change something inside plugins which is OK

- name: install plugins 
  copy: 
    src: "{{ item.src }}"
    dest: "{{ item.dest }}"
    mode: 0755
    owner: root
    group: root
  with_items: 
    - { src: mk_logins,dest: '/usr/lib/check_mk_agent/plugins'}
    - { src: symantec_av,dest: '/usr/lib/check_mk_agent/plugins'}


TASK [check-mk-agent : install plugins] 
***********************************************************************************
ok: [rhl1] => (item={u'dest': u'/usr/lib/check_mk_agent/plugins', u'src': 
u'mk_logins'})
ok: [rhl1] => (item={u'dest': u'/usr/lib/check_mk_agent/plugins', u'src': 
u'symantec_av'})




but if I use variable  for path "/usr/lib/check_mk_agent/plugins" then 
ansible always reports changed when I run ansible-playbook

variable in defaults/main.yml

plugins_dir: 'usr/lib/check_mk_agent/plugins'



- name: install plugins 
  copy: 
    src: "{{ item.src }}"
    dest: "{{ item.dest }}"
    mode: 0755
    owner: root
    group: root
  with_items: 
    - { src: mk_logins,dest: plugins_dir }
    - { src: symantec_av,dest: plugins_dir }




TASK [check-mk-agent : install plugins] 
***********************************************************************************
changed: [rhl1] => (item={u'dest': u'plugins_dir', u'src': u'mk_logins'})
changed: [rhl1] => (item={u'dest': u'plugins_dir', u'src': u'symantec_av'})


So question is why is this happen?  

Thanks

-- 
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/b7312ff6-80d6-4167-b2d4-961df092e2ec%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to