From 45e7689335be1d5e29208cfe1b5146b5abe2c3bf Mon Sep 17 00:00:00 2001 From: Michael Gajda Date: Mon, 26 Feb 2018 20:17:01 +0100 Subject: [PATCH] Fix lineinfile example The examples comment said 'Add a line to a file if it does not exist, without passing regexp' which suggests, that the file is being created. But the default for 'create' is false. Thus the example lacked this option. --- lib/ansible/modules/files/lineinfile.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ansible/modules/files/lineinfile.py b/lib/ansible/modules/files/lineinfile.py index 4c0c62ac91..1ca4ce03f3 100644 --- a/lib/ansible/modules/files/lineinfile.py +++ b/lib/ansible/modules/files/lineinfile.py @@ -154,6 +154,7 @@ EXAMPLES = r""" - lineinfile: path: /tmp/testfile line: '192.168.1.99 foo.lab.net foo' + create: true # Fully quoted because of the ': ' on the line. See the Gotchas in the YAML docs. - lineinfile: