Commit Graph

16 Commits (248ea2deeae1602f2b7f399087992be396ada4ea)

Author SHA1 Message Date
Jeff Widman 70b3290a3b Move validate command into doc fragment and fix a few typos 2016-12-08 11:23:24 -05:00
gimoh fd69c5687b Do not insert extra newline if line already contains it
When using YAML multi-line strings, e.g.:

- lineinfile:
    dest: /tmp/foo
    line: >
      foo
      bar

the line already ends with a newline.  If an extra newline is appended unconditionally it will lead to inserting an extra newline on each run.
2016-12-08 11:23:13 -05:00
Greg DeKoenigsberg eb881d7d5d Proper author info for all remaining modules 2016-12-08 11:23:07 -05:00
jaypei fbc8d4ca4a use the right way to unescape line string Reference https://github.com/ansible/ansible/issues/10864 2016-12-08 11:23:03 -05:00
Toshio Kuratomi 20d7f929be Fix use of codecs.escape_decode() 2016-12-08 11:22:59 -05:00
Toshio Kuratomi 5204e94bda Slightly more future-proof version of the lineinfile fix 2016-12-08 11:22:59 -05:00
Toshio Kuratomi 1002fafedf Correct lineinfile documentation about double quoting... Hasn't been the case for years. 2016-12-08 11:22:59 -05:00
Toshio Kuratomi 86f8a3d381 Clarify the documented behaviour of insertbefore slightly. 2016-12-08 11:22:46 -05:00
Piotr Gosławski 9dd4f22430 update docs for insertbefore/insertafter 2016-12-08 11:22:46 -05:00
Piotr Gosławski d388516046 Fix behavior when insert* doesn't match anything
If insertbefore/insertafter didn't match anything, lineinfile module was doing nothing, instead of adding the line at end of fille as it's supposed to.
2016-12-08 11:22:46 -05:00
Jeff Bradberry 60ed80f99a Fix breakage in lineinfile check mode when target file does not exist.
Similarly to https://github.com/ansible/ansible/issues/6182, checking of the file attributes should be avoided in check mode when the file didn't originally exist.

Also, avoid creating parent directories in check mode.

Fixes https://github.com/ansible/ansible/issues/9546
2016-12-08 11:22:33 -05:00
Eric 11bd0fed9d Fix lineinfile documentation typo 2016-12-08 11:22:28 -05:00
James Cammarata 429ab56e14 Adding file doc fragment to those modules in files/ missing it 2016-12-08 11:22:23 -05:00
Eric Hanchrow e4ac716663 Tweak docs to mention `replace` 2016-12-08 11:22:23 -05:00
Major Hayden e3449b6691 Updating SELinux example doc in lininefile module
Encouraging users to use this Ansible module to enable SELinux seems
like a better idea. It also warms Dan Walsh's heart.

Signed-off-by: Major Hayden <major@mhtx.net>
2016-12-08 11:22:23 -05:00
Michael DeHaan 213e518165 file extensions! 2016-12-08 11:22:22 -05:00