Clarify which modes use "before", "after", and "indent" options

This clarification was added both the the file.line module and
file.line state docs.
This commit is contained in:
rallytime 2016-11-07 12:19:29 -07:00
parent 8b2d2b9e7b
commit 25821bb8db
2 changed files with 12 additions and 2 deletions

View file

@ -1462,9 +1462,13 @@ def line(path, content, match=None, mode=None, location=None,
before
Regular expression or an exact case-sensitive fragment of the string.
This option is only used when either the ``ensure`` or ``insert`` mode
is defined.
after
Regular expression or an exact case-sensitive fragment of the string.
This option is only used when either the ``ensure`` or ``insert`` mode
is defined.
show_changes
Output a unified diff of the old file and the new file.
@ -1484,7 +1488,8 @@ def line(path, content, match=None, mode=None, location=None,
tried to be edited does not exist and nothing really happened.
indent
Keep indentation with the previous line.
Keep indentation with the previous line. This option is not considered when
the ``delete`` mode is specified.
CLI Example:

View file

@ -2699,9 +2699,13 @@ def line(name, content, match=None, mode=None, location=None,
before
Regular expression or an exact case-sensitive fragment of the string.
This option is only used when either the ``ensure`` or ``insert`` mode
is defined.
after
Regular expression or an exact case-sensitive fragment of the string.
This option is only used when either the ``ensure`` or ``insert`` mode
is defined.
show_changes
Output a unified diff of the old file and the new file.
@ -2721,7 +2725,8 @@ def line(name, content, match=None, mode=None, location=None,
tried to be edited does not exist and nothing really happened.
indent
Keep indentation with the previous line.
Keep indentation with the previous line. This option is not considered when
the ``delete`` mode is specified.
.. code-block: yaml