Ansible "copy" module not working through Playbook

Hi,

I dont know whenether im going nuts or just havent RTFM enough, but the following is my issue;

When using ansibile from command-line to copy an file it works perfect;

ansible test.domain.local -m copy -a “src=/mgmt/cmdb/shared/etc/exim.conf dest=/etc/exim.conf owner=root group=root mode=0644”

test.domain.locall | success >> {
“changed”: true,
“gid”: 0,
“group”: “root”,
“mode”: “0644”,
“owner”: “root”,
“path”: “/etc/exim.conf”,
“size”: 2660,
“state”: “file”,
“uid”: 0
}

Every change i write to the file is being updated to the remote host and its being updated vice versa, etc.

However; when i use it in an playbook;

"

My first thought is your first /usr/bin/ansible command placed it correctly so the second /usr/bin/ansible-playbook command didn’t have to.

I see “test.domain.locall” returned by Ansible. Is it possible you have a typo somwhere and are looking on the wrong host or something?

Hi Michael,

That was it! I figured it out now :slight_smile: Thanks for your time and help!

Kind regards,

Gijs