mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 22:33:25 +00:00
Validate EXAMPLES as YAML
This commit is contained in:
committed by
Toshio Kuratomi
parent
499d3a1b53
commit
7c00346714
@@ -76,14 +76,14 @@ options:
|
||||
|
||||
EXAMPLES = """
|
||||
- name: set hostname with file lookup
|
||||
ops_template:
|
||||
ops_template:
|
||||
src: ./hostname.json
|
||||
backup: yes
|
||||
remote_user: admin
|
||||
become: yes
|
||||
|
||||
- name: set hostname with var
|
||||
ops_template:
|
||||
ops_template:
|
||||
src: "{{ config }}"
|
||||
remote_user: admin
|
||||
become: yes
|
||||
|
||||
@@ -85,6 +85,7 @@ options:
|
||||
EXAMPLES = """
|
||||
# Note: examples below use the following provider dict to handle
|
||||
# transport and authentication to the node.
|
||||
---
|
||||
vars:
|
||||
cli:
|
||||
host: "{{ inventory_hostname }}"
|
||||
@@ -92,6 +93,7 @@ vars:
|
||||
password: netop
|
||||
transport: cli
|
||||
|
||||
---
|
||||
- ops_command:
|
||||
commands:
|
||||
- show version
|
||||
|
||||
@@ -139,12 +139,14 @@ options:
|
||||
EXAMPLES = """
|
||||
# Note: examples below use the following provider dict to handle
|
||||
# transport and authentication to the node.
|
||||
---
|
||||
vars:
|
||||
cli:
|
||||
host: "{{ inventory_hostname }}"
|
||||
username: netop
|
||||
password: netop
|
||||
|
||||
---
|
||||
- name: configure hostname over cli
|
||||
ops_config:
|
||||
lines:
|
||||
|
||||
@@ -73,6 +73,7 @@ options:
|
||||
EXAMPLES = """
|
||||
# Note: examples below use the following provider dict to handle
|
||||
# transport and authentication to the node.
|
||||
---
|
||||
vars:
|
||||
cli:
|
||||
host: "{{ inventory_hostname }}"
|
||||
@@ -85,6 +86,7 @@ vars:
|
||||
password: netop
|
||||
transport: rest
|
||||
|
||||
---
|
||||
- ops_facts:
|
||||
gather_subset: all
|
||||
provider: "{{ rest }}"
|
||||
|
||||
Reference in New Issue
Block a user