From 761f99a4e32c010dadb1cb654f229abdd2d9eef7 Mon Sep 17 00:00:00 2001 From: Shuang Wang Date: Fri, 12 Oct 2018 10:48:54 +0900 Subject: [PATCH] add sample for follow parameter of copy.py (#45765) * add sample for follow parameter of copy.py --- lib/ansible/modules/files/copy.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/ansible/modules/files/copy.py b/lib/ansible/modules/files/copy.py index 96be2075fb..b8aa8a67ef 100644 --- a/lib/ansible/modules/files/copy.py +++ b/lib/ansible/modules/files/copy.py @@ -164,6 +164,18 @@ EXAMPLES = r''' copy: content: '# This file was moved to /etc/other.conf' dest: /etc/mine.conf + +- name: if follow is true, /path/to/file will be overwritten by contents of foo.conf + copy: + src: /etc/foo.conf + dest: /path/to/link # /path/to/link is link to /path/to/file + follow: True + +- name: if follow is False, /path/to/link will become a file and be overwritten by contents of foo.conf + copy: + src: /etc/foo.conf + dest: /path/to/link # /path/to/link is link to /path/to/file + follow: False ''' RETURN = r'''