Empty file while copying from localhost

7 views
Skip to first unread message

Alain Gilbert

unread,
Nov 7, 2019, 3:31:40 PM11/7/19
to Ansible Project
I have a bug with Ansible 2.8.3.
I create a vm from a template and one of my step is to copy a local file to the remote server.
When the last task (copy) is done and I reboot the server, the file exist but is empty.

Do you know why Ansible does'nt made the change ? There is no error... Is a cache is drop when I reboot the VM ?

- file: path=/etc/sysconfig/network-scripts/ifcfg-ens192 state=absent
  delegate_to: '{{m_ip_template}}'
- copy: src=/tmp/{{m_serveur}}-ifcfg-ens192 dest=/etc/sysconfig/network-scripts/ifcfg-ens192 mode=600
  delegate_to: '{{m_ip_template}}'
- .... Reboot the server

Thanks !!!

Reply all
Reply to author
Forward
0 new messages