From 9dd4f224301c9f306c2855fa1b09ee660db4f07f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Gos=C5=82awski?= Date: Thu, 4 Dec 2014 17:07:03 +0100 Subject: [PATCH] update docs for insertbefore/insertafter --- lib/ansible/modules/files/lineinfile.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/ansible/modules/files/lineinfile.py b/lib/ansible/modules/files/lineinfile.py index 11fd47027e..a89dcf0b33 100644 --- a/lib/ansible/modules/files/lineinfile.py +++ b/lib/ansible/modules/files/lineinfile.py @@ -85,8 +85,9 @@ options: default: EOF description: - Used with C(state=present). If specified, the line will be inserted - after the specified regular expression. A special value is - available; C(EOF) for inserting the line at the end of the file. + after the last match of specified regular expression. A special value is + available; C(EOF) for inserting the line at the end of the file. + If specified regular expresion has no matches, EOF will be used instead. May not be used with C(backrefs). choices: [ 'EOF', '*regex*' ] insertbefore: @@ -94,9 +95,10 @@ options: version_added: "1.1" description: - Used with C(state=present). If specified, the line will be inserted - before the specified regular expression. A value is available; - C(BOF) for inserting the line at the beginning of the file. - May not be used with C(backrefs). + before the last match of specified regular expression. A value is + available; C(BOF) for inserting the line at the beginning of the file. + If specified regular expresion has no matches, C(insertbefore) will be + ignored. May not be used with C(backrefs). choices: [ 'BOF', '*regex*' ] create: required: false