mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 03:41:25 -07:00
Examples syntax batch4 (#5620)
* Change example syntax on authorized_key module * Change example syntax on cron module * Change example syntax on group module * Change example syntax on hostname module * Change example syntax on seboolean module * Change example syntax on selinux module * Change example syntax on service module * Change example syntax on sysctl module * Change example syntax on systemd module * Change example syntax on user module * Change example syntax on debug module * Change example syntax on fail module * Change example syntax on include module * Change example syntax on include_role module * Change example syntax on include_vars module * Change example syntax on pause module * Change example syntax on wait_for module * Change example syntax on apache2_module module * > Change example syntax on django_manage module * Change example syntax on htpasswd module
This commit is contained in:
parent
ad6999e2eb
commit
b56a9852ee
20 changed files with 261 additions and 87 deletions
|
@ -44,23 +44,29 @@ options:
|
|||
required: False
|
||||
default: 0
|
||||
version_added: "2.1"
|
||||
author:
|
||||
author:
|
||||
- "Dag Wieers (@dagwieers)"
|
||||
- "Michael DeHaan"
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
# Example that prints the loopback address and gateway for each host
|
||||
- debug: msg="System {{ inventory_hostname }} has uuid {{ ansible_product_uuid }}"
|
||||
- debug:
|
||||
msg: "System {{ inventory_hostname }} has uuid {{ ansible_product_uuid }}"
|
||||
|
||||
- debug: msg="System {{ inventory_hostname }} has gateway {{ ansible_default_ipv4.gateway }}"
|
||||
- debug:
|
||||
msg: "System {{ inventory_hostname }} has gateway {{ ansible_default_ipv4.gateway }}"
|
||||
when: ansible_default_ipv4.gateway is defined
|
||||
|
||||
- shell: /usr/bin/uptime
|
||||
register: result
|
||||
|
||||
- debug: var=result verbosity=2
|
||||
- debug:
|
||||
var: result
|
||||
verbosity: 2
|
||||
|
||||
- name: Display all variables/facts known for a host
|
||||
debug: var=hostvars[inventory_hostname] verbosity=4
|
||||
debug:
|
||||
var: hostvars[inventory_hostname]
|
||||
verbosity: 4
|
||||
'''
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue