From 1c1c103d93030d84df426bcba5979f06c0f5b385 Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Thu, 5 Sep 2013 20:37:54 -0500 Subject: [PATCH] Corrected example for lineinfile due to ': ' on line Closes #3992 --- files/lineinfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/files/lineinfile b/files/lineinfile index 29ff9603fdf..35684167133 100644 --- a/files/lineinfile +++ b/files/lineinfile @@ -124,7 +124,8 @@ EXAMPLES = r""" - lineinfile: dest=/etc/services regexp="^# port for http" insertbefore="^www.*80/tcp" line="# port for http by default" -- lineinfile: dest=/etc/sudoers state=present regexp='^%wheel' line='%wheel ALL=(ALL) NOPASSWD: ALL' +# Fully quoted because of the ': ' on the line. See the Gotchas in the YAML docs. +- lineinfile: "dest=/etc/sudoers state=present regexp='^%wheel' line='%wheel ALL=(ALL) NOPASSWD: ALL'" - lineinfile: dest=/opt/jboss-as/bin/standalone.conf regexp='^(.*)Xms(\d+)m(.*)$' line='\1Xms${xms}m\3' backrefs=yes """