mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-04 23:44:00 -07:00
modules: fix examples to use FQCN for builtin modules (#648)
* modules: fix examples to use FQCN for builtin modules * fix * fix * fix * fix * fix * fix * fix
This commit is contained in:
parent
c034e8c04f
commit
c055340ecb
126 changed files with 290 additions and 286 deletions
|
@ -55,7 +55,7 @@ EXAMPLES = r'''
|
|||
delegate_to: localhost
|
||||
register: results
|
||||
|
||||
- fail:
|
||||
- ansible.builtin.fail:
|
||||
msg: 'CMDB serial ({{ cmdb_serialno }}) does not match hardware serial ({{ results.hw_system_serial }}) !'
|
||||
when: cmdb_serialno != results.hw_system_serial
|
||||
'''
|
||||
|
|
|
@ -42,7 +42,7 @@ notes:
|
|||
|
||||
EXAMPLES = r'''
|
||||
- name: Example hponcfg configuration XML
|
||||
copy:
|
||||
ansible.builtin.copy:
|
||||
content: |
|
||||
<ribcl VERSION="2.0">
|
||||
<login USER_LOGIN="user" PASSWORD="password">
|
||||
|
|
|
@ -43,7 +43,7 @@ EXAMPLES = '''
|
|||
api_version: 500
|
||||
delegate_to: localhost
|
||||
register: result
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ result.datacenters }}"
|
||||
|
||||
- name: Gather paginated, filtered and sorted information about Data Centers
|
||||
|
@ -58,7 +58,7 @@ EXAMPLES = '''
|
|||
sort: 'name:descending'
|
||||
filter: 'state=Unmanaged'
|
||||
register: result
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ result.datacenters }}"
|
||||
|
||||
- name: Gather information about a Data Center by name
|
||||
|
@ -70,7 +70,7 @@ EXAMPLES = '''
|
|||
name: "My Data Center"
|
||||
delegate_to: localhost
|
||||
register: result
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ result.datacenters }}"
|
||||
|
||||
- name: Gather information about the Data Center Visual Content
|
||||
|
@ -84,9 +84,9 @@ EXAMPLES = '''
|
|||
- visualContent
|
||||
delegate_to: localhost
|
||||
register: result
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ result.datacenters }}"
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ result.datacenter_visual_content }}"
|
||||
'''
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ EXAMPLES = '''
|
|||
no_log: true
|
||||
delegate_to: localhost
|
||||
register: result
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ result.enclosures }}"
|
||||
|
||||
- name: Gather paginated, filtered and sorted information about Enclosures
|
||||
|
@ -63,7 +63,7 @@ EXAMPLES = '''
|
|||
no_log: true
|
||||
delegate_to: localhost
|
||||
register: result
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ result.enclosures }}"
|
||||
|
||||
- name: Gather information about an Enclosure by name
|
||||
|
@ -76,7 +76,7 @@ EXAMPLES = '''
|
|||
no_log: true
|
||||
delegate_to: localhost
|
||||
register: result
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ result.enclosures }}"
|
||||
|
||||
- name: Gather information about an Enclosure by name with options
|
||||
|
@ -93,13 +93,13 @@ EXAMPLES = '''
|
|||
no_log: true
|
||||
delegate_to: localhost
|
||||
register: result
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ result.enclosures }}"
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ result.enclosure_script }}"
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ result.enclosure_environmental_configuration }}"
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ result.enclosure_utilization }}"
|
||||
|
||||
- name: "Gather information about an Enclosure with temperature data at a resolution of one sample per day, between two
|
||||
|
@ -121,9 +121,9 @@ EXAMPLES = '''
|
|||
no_log: true
|
||||
delegate_to: localhost
|
||||
register: result
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ result.enclosures }}"
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ result.enclosure_utilization }}"
|
||||
'''
|
||||
|
||||
|
|
|
@ -40,7 +40,7 @@ EXAMPLES = '''
|
|||
delegate_to: localhost
|
||||
register: result
|
||||
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ result.ethernet_networks }}"
|
||||
|
||||
- name: Gather paginated and filtered information about Ethernet Networks
|
||||
|
@ -54,7 +54,7 @@ EXAMPLES = '''
|
|||
delegate_to: localhost
|
||||
register: result
|
||||
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ result.ethernet_networks }}"
|
||||
|
||||
- name: Gather information about an Ethernet Network by name
|
||||
|
@ -64,7 +64,7 @@ EXAMPLES = '''
|
|||
delegate_to: localhost
|
||||
register: result
|
||||
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ result.ethernet_networks }}"
|
||||
|
||||
- name: Gather information about an Ethernet Network by name with options
|
||||
|
@ -77,9 +77,9 @@ EXAMPLES = '''
|
|||
delegate_to: localhost
|
||||
register: result
|
||||
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ result.enet_associated_profiles }}"
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ result.enet_associated_uplink_groups }}"
|
||||
'''
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ EXAMPLES = '''
|
|||
delegate_to: localhost
|
||||
register: result
|
||||
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ result.fc_networks }}"
|
||||
|
||||
- name: Gather paginated, filtered and sorted information about Fibre Channel Networks
|
||||
|
@ -50,7 +50,7 @@ EXAMPLES = '''
|
|||
filter: 'fabricType=FabricAttach'
|
||||
delegate_to: localhost
|
||||
register: result
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ result.fc_networks }}"
|
||||
|
||||
- name: Gather information about a Fibre Channel Network by name
|
||||
|
@ -60,7 +60,7 @@ EXAMPLES = '''
|
|||
delegate_to: localhost
|
||||
register: result
|
||||
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ result.fc_networks }}"
|
||||
'''
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ EXAMPLES = '''
|
|||
delegate_to: localhost
|
||||
register: result
|
||||
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ result.fcoe_networks }}"
|
||||
|
||||
- name: Gather paginated, filtered and sorted information about FCoE Networks
|
||||
|
@ -50,7 +50,7 @@ EXAMPLES = '''
|
|||
delegate_to: localhost
|
||||
register: result
|
||||
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ result.fcoe_networks }}"
|
||||
|
||||
- name: Gather information about a FCoE Network by name
|
||||
|
@ -60,7 +60,7 @@ EXAMPLES = '''
|
|||
delegate_to: localhost
|
||||
register: result
|
||||
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ result.fcoe_networks }}"
|
||||
'''
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ EXAMPLES = '''
|
|||
delegate_to: localhost
|
||||
register: result
|
||||
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ result.logical_interconnect_groups }}"
|
||||
|
||||
- name: Gather paginated, filtered and sorted information about Logical Interconnect Groups
|
||||
|
@ -59,7 +59,7 @@ EXAMPLES = '''
|
|||
delegate_to: localhost
|
||||
register: result
|
||||
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ result.logical_interconnect_groups }}"
|
||||
|
||||
- name: Gather information about a Logical Interconnect Group by name
|
||||
|
@ -73,7 +73,7 @@ EXAMPLES = '''
|
|||
delegate_to: localhost
|
||||
register: result
|
||||
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ result.logical_interconnect_groups }}"
|
||||
'''
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ EXAMPLES = '''
|
|||
delegate_to: localhost
|
||||
register: result
|
||||
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ result.network_sets }}"
|
||||
|
||||
- name: Gather paginated, filtered, and sorted information about Network Sets
|
||||
|
@ -65,7 +65,7 @@ EXAMPLES = '''
|
|||
delegate_to: localhost
|
||||
register: result
|
||||
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ result.network_sets }}"
|
||||
|
||||
- name: Gather information about all Network Sets, excluding Ethernet networks
|
||||
|
@ -80,7 +80,7 @@ EXAMPLES = '''
|
|||
delegate_to: localhost
|
||||
register: result
|
||||
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ result.network_sets }}"
|
||||
|
||||
- name: Gather information about a Network Set by name
|
||||
|
@ -94,7 +94,7 @@ EXAMPLES = '''
|
|||
delegate_to: localhost
|
||||
register: result
|
||||
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ result.network_sets }}"
|
||||
|
||||
- name: Gather information about a Network Set by name, excluding Ethernet networks
|
||||
|
@ -110,7 +110,7 @@ EXAMPLES = '''
|
|||
delegate_to: localhost
|
||||
register: result
|
||||
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ result.network_sets }}"
|
||||
'''
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ EXAMPLES = '''
|
|||
delegate_to: localhost
|
||||
register: result
|
||||
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ result.san_managers }}"
|
||||
|
||||
- name: Gather paginated, filtered and sorted information about SAN Managers
|
||||
|
@ -57,7 +57,7 @@ EXAMPLES = '''
|
|||
delegate_to: localhost
|
||||
register: result
|
||||
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ result.san_managers }}"
|
||||
|
||||
- name: Gather information about a SAN Manager by provider display name
|
||||
|
@ -67,7 +67,7 @@ EXAMPLES = '''
|
|||
delegate_to: localhost
|
||||
register: result
|
||||
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ result.san_managers }}"
|
||||
'''
|
||||
|
||||
|
|
|
@ -71,11 +71,11 @@ EXAMPLES = '''
|
|||
idrac_attributes: "{{ result.redfish_facts.entries | selectattr('Id', 'defined') | selectattr('Id', 'equalto', 'iDRACAttributes') | list | first }}"
|
||||
|
||||
- name: Display all iDRAC attributes
|
||||
debug:
|
||||
ansible.builtin.debug:
|
||||
var: idrac_attributes
|
||||
|
||||
- name: Display the value of 'Syslog.1.SysLogEnable' iDRAC attribute
|
||||
debug:
|
||||
ansible.builtin.debug:
|
||||
var: idrac_attributes['Syslog.1.SysLogEnable']
|
||||
|
||||
# Examples to display the value of all or a single LifecycleController attribute
|
||||
|
@ -84,11 +84,11 @@ EXAMPLES = '''
|
|||
lc_attributes: "{{ result.redfish_facts.entries | selectattr('Id', 'defined') | selectattr('Id', 'equalto', 'LCAttributes') | list | first }}"
|
||||
|
||||
- name: Display LifecycleController attributes
|
||||
debug:
|
||||
ansible.builtin.debug:
|
||||
var: lc_attributes
|
||||
|
||||
- name: Display the value of 'CollectSystemInventoryOnRestart' attribute
|
||||
debug:
|
||||
ansible.builtin.debug:
|
||||
var: lc_attributes['LCAttributes.1.CollectSystemInventoryOnRestart']
|
||||
|
||||
# Examples to display the value of all or a single System attribute
|
||||
|
@ -97,11 +97,11 @@ EXAMPLES = '''
|
|||
system_attributes: "{{ result.redfish_facts.entries | selectattr('Id', 'defined') | selectattr('Id', 'equalto', 'SystemAttributes') | list | first }}"
|
||||
|
||||
- name: Display System attributes
|
||||
debug:
|
||||
ansible.builtin.debug:
|
||||
var: system_attributes
|
||||
|
||||
- name: Display the value of 'PSRedPolicy'
|
||||
debug:
|
||||
ansible.builtin.debug:
|
||||
var: system_attributes['ServerPwr.1.PSRedPolicy']
|
||||
|
||||
'''
|
||||
|
|
|
@ -62,7 +62,7 @@ EXAMPLES = '''
|
|||
username: "{{ username }}"
|
||||
password: "{{ password }}"
|
||||
register: result
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ result.redfish_facts.cpu.entries | to_nice_json }}"
|
||||
|
||||
- name: Get CPU model
|
||||
|
@ -73,7 +73,7 @@ EXAMPLES = '''
|
|||
username: "{{ username }}"
|
||||
password: "{{ password }}"
|
||||
register: result
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ result.redfish_facts.cpu.entries.0.Model }}"
|
||||
|
||||
- name: Get memory inventory
|
||||
|
@ -103,7 +103,7 @@ EXAMPLES = '''
|
|||
username: "{{ username }}"
|
||||
password: "{{ password }}"
|
||||
register: result
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ result.redfish_facts.virtual_media.entries | to_nice_json }}"
|
||||
|
||||
- name: Get Volume Inventory
|
||||
|
@ -114,7 +114,7 @@ EXAMPLES = '''
|
|||
username: "{{ username }}"
|
||||
password: "{{ password }}"
|
||||
register: result
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ result.redfish_facts.volume.entries | to_nice_json }}"
|
||||
|
||||
- name: Get Session information
|
||||
|
@ -125,7 +125,7 @@ EXAMPLES = '''
|
|||
username: "{{ username }}"
|
||||
password: "{{ password }}"
|
||||
register: result
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ result.redfish_facts.session.entries | to_nice_json }}"
|
||||
|
||||
- name: Get default inventory information
|
||||
|
@ -134,7 +134,7 @@ EXAMPLES = '''
|
|||
username: "{{ username }}"
|
||||
password: "{{ password }}"
|
||||
register: result
|
||||
- debug:
|
||||
- ansible.builtin.debug:
|
||||
msg: "{{ result.redfish_facts | to_nice_json }}"
|
||||
|
||||
- name: Get several inventories
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue