mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
Fix code-blocks to use correct syntax highlighting
This commit is contained in:
@@ -121,7 +121,7 @@ options:
|
||||
'''
|
||||
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r'''
|
||||
# Recursively find /tmp files older than 2 days
|
||||
- find:
|
||||
paths: "/tmp"
|
||||
@@ -149,9 +149,11 @@ EXAMPLES = '''
|
||||
size: "10m"
|
||||
|
||||
# find /var/log files equal or greater than 10 megabytes ending with .old or .log.gz via regex
|
||||
# Note that yaml double quotes require escaping backslashes but yaml single
|
||||
# quotes do not.
|
||||
- find:
|
||||
paths: "/var/tmp"
|
||||
patterns: "^.*?\.(?:old|log\.gz)$"
|
||||
patterns: "^.*?\\.(?:old|log\\.gz)$"
|
||||
size: "10m"
|
||||
use_regex: True
|
||||
'''
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user