summaryrefslogtreecommitdiff
path: root/lib/ansible/modules/files/lineinfile.py
diff options
context:
space:
mode:
authorToshio Kuratomi <a.badger@gmail.com>2017-01-07 08:50:10 -0800
committerToshio Kuratomi <a.badger@gmail.com>2017-01-07 13:00:15 -0800
commitaee66d7b5b74651acd4e2c5de8a9e2b02f2a0fc5 (patch)
tree322f7b591cbbd8349ac68f3e04a9aa0168aab360 /lib/ansible/modules/files/lineinfile.py
parentadb7426c0c3e52db719c388f51a8bb4aadf453e7 (diff)
downloadansible-docs-code-block-fixes.tar.gz
Fix code-blocks to use correct syntax highlightingdocs-code-block-fixes
Diffstat (limited to 'lib/ansible/modules/files/lineinfile.py')
-rw-r--r--lib/ansible/modules/files/lineinfile.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/ansible/modules/files/lineinfile.py b/lib/ansible/modules/files/lineinfile.py
index ba7f4a3cc1..28202aa4ac 100644
--- a/lib/ansible/modules/files/lineinfile.py
+++ b/lib/ansible/modules/files/lineinfile.py
@@ -160,15 +160,16 @@ EXAMPLES = r"""
line: '192.168.1.99 foo.lab.net foo'
# Fully quoted because of the ': ' on the line. See the Gotchas in the YAML docs.
-- lineinfile: "
+- lineinfile:
dest: /etc/sudoers
state: present
- regexp: '^%wheel'
+ regexp: '^%wheel\s'
line: '%wheel ALL=(ALL) NOPASSWD: ALL'
+# Yaml requires escaping backslashes in double quotes but not in single quotes
- lineinfile:
dest: /opt/jboss-as/bin/standalone.conf
- regexp: '^(.*)Xms(\d+)m(.*)$'
+ regexp: "^(.*)Xms(\\d+)m(.*)$"
line: '\1Xms${xms}m\3'
backrefs: yes