From 0be573474161878d6c8da5311302dd319d75a74a Mon Sep 17 00:00:00 2001 From: Alicia Cozine Date: Fri, 17 Aug 2018 09:19:07 -0500 Subject: [PATCH] add insertbefore/after details to lineinefile docs (#44277) --- lib/ansible/modules/files/lineinfile.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/files/lineinfile.py b/lib/ansible/modules/files/lineinfile.py index 5904c25506..a898f7cb3d 100644 --- a/lib/ansible/modules/files/lineinfile.py +++ b/lib/ansible/modules/files/lineinfile.py @@ -78,6 +78,7 @@ options: A special value is available; C(EOF) for inserting the line at the end of the file. If specified regular expression has no matches, EOF will be used instead. + If regular expressions are passed to both C(regexp) and C(insertafter), C(insertafter) is only honored if no match for C(regexp) is found. May not be used with C(backrefs). choices: [ EOF, '*regex*' ] default: EOF @@ -89,7 +90,9 @@ options: A value is available; C(BOF) for inserting the line at the beginning of the file. If specified regular expression has no matches, the line will be - inserted at the end of the file. May not be used with C(backrefs). + inserted at the end of the file. + If regular expressions are passed to both C(regexp) and C(insertbefore), C(insertbefore) is only honored if no match for C(regexp) is found. + May not be used with C(backrefs). choices: [ BOF, '*regex*' ] version_added: "1.1" create: