Ansible 2.2.0

Copy module documentation says, "Options / force: the default is yes, which 
will replace the remote file when contents are different than the source. 
If no, the file will only be transferred if the destination does not exist."

A sample playbook:

---

- hosts: localhost

  tasks:
    - file:
        dest: "{{ item }}"
        state: absent
      with_items:
        - /tmp/passwd
        - /tmp/ntp.conf

    - copy: 
        src: "{{ item.src }}"
        dest: /tmp
        force: "{{ item.force }}"
      with_items:
        - { src: /etc/passwd, force: yes }
        - { src: /etc/ntp.conf, force: no }

    - command: 'ls /tmp/passwd /tmp/ntp.conf'

The documentation leads me to believe that /tmp/ntp.conf should be present 
at the end of this play.  Am I missing something?

Oscar

-- 
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/bce439dc-7aa6-419f-81b6-49c52583e5e4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to