Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

corrected one of the examples to escape the ": " properly #3992

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 6 additions & 1 deletion library/files/lineinfile
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,12 @@ 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'
- lineinfile:
dest: /etc/sudoers # This example is laid out differently
state: present # the reason for that is that the last line contains
regexp: '^%wheel' # a ": " sequence which will otherwise cause issues.
line: '%wheel ALL=(ALL) NOPASSWD: ALL' # See the Gotchas in the YAML docs.


- lineinfile: dest=/opt/jboss-as/bin/standalone.conf regexp='^(.*)Xms(\d+)m(.*)$' line='\1Xms${xms}m\3' backrefs=yes
"""
Expand Down