diff --git a/lib/ansible/modules/files/lineinfile.py b/lib/ansible/modules/files/lineinfile.py index a8e618ddfae..1283d33e5d2 100644 --- a/lib/ansible/modules/files/lineinfile.py +++ b/lib/ansible/modules/files/lineinfile.py @@ -82,8 +82,9 @@ options: - If the first match is required, use(firstmatch=yes). - 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 C(insertbefore) is set, default value C(EOF) will be ignored. - 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). + - May not be used with C(backrefs) or C(insertbefore). type: str choices: [ EOF, '*regex*' ] default: EOF @@ -95,7 +96,7 @@ 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. - 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). + - May not be used with C(backrefs) or C(insertafter). type: str choices: [ BOF, '*regex*' ] version_added: "1.1"