Validate EXAMPLES as YAML

This commit is contained in:
Matt Martz
2017-02-07 15:39:24 -06:00
committed by Toshio Kuratomi
parent 499d3a1b53
commit 7c00346714
112 changed files with 441 additions and 381 deletions

View File

@@ -91,7 +91,7 @@ EXAMPLES = '''
state: opts_present
opts: discard
with_items: '{{ ansible_mounts }}'
when: '/dev/mapper/luks-' in {{ item.device }}
when: "'/dev/mapper/luks-' in {{ item.device }}"
'''
from ansible.module_utils.basic import *

View File

@@ -136,7 +136,7 @@ EXAMPLES = """
control: required
module_path: pam_faillock.so
new_type: auth
new_control=sufficient
new_control: sufficient
new_module_path: pam_faillock.so
state: after

View File

@@ -92,28 +92,28 @@ author:
EXAMPLES = """
# Display facts from all hosts and store them indexed by I(hostname) at C(/tmp/facts).
ansible all -m setup --tree /tmp/facts
# ansible all -m setup --tree /tmp/facts
# Display only facts regarding memory found by ansible on all hosts and output them.
ansible all -m setup -a 'filter=ansible_*_mb'
# ansible all -m setup -a 'filter=ansible_*_mb'
# Display only facts returned by facter.
ansible all -m setup -a 'filter=facter_*'
# ansible all -m setup -a 'filter=facter_*'
# Display only facts about certain interfaces.
ansible all -m setup -a 'filter=ansible_eth[0-2]'
# ansible all -m setup -a 'filter=ansible_eth[0-2]'
# Restrict additional gathered facts to network and virtual.
ansible all -m setup -a 'gather_subset=network,virtual'
# ansible all -m setup -a 'gather_subset=network,virtual'
# Do not call puppet facter or ohai even if present.
ansible all -m setup -a 'gather_subset=!facter,!ohai'
# ansible all -m setup -a 'gather_subset=!facter,!ohai'
# Only collect the minimum amount of facts:
ansible all -m setup -a 'gather_subset=!all'
# ansible all -m setup -a 'gather_subset=!all'
# Display facts from Windows hosts with custom facts stored in C(C:\\custom_facts).
ansible windows -m setup -a "fact_path='c:\\custom_facts'"
# ansible windows -m setup -a "fact_path='c:\\custom_facts'"
"""