diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-18 05:52:22 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-18 05:52:22 +0000 |
commit | 38b7c80217c4e72b1d8988eb1e60bb6e77334114 (patch) | |
tree | 356e9fd3762877d07cde52d21e77070aeff7e789 /ansible_collections/dellemc/openmanage/playbooks/idrac | |
parent | Adding upstream version 7.7.0+dfsg. (diff) | |
download | ansible-38b7c80217c4e72b1d8988eb1e60bb6e77334114.tar.xz ansible-38b7c80217c4e72b1d8988eb1e60bb6e77334114.zip |
Adding upstream version 9.4.0+dfsg.upstream/9.4.0+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'ansible_collections/dellemc/openmanage/playbooks/idrac')
33 files changed, 1919 insertions, 1416 deletions
diff --git a/ansible_collections/dellemc/openmanage/playbooks/idrac/dellemc_idrac_storage_volume.yml b/ansible_collections/dellemc/openmanage/playbooks/idrac/dellemc_idrac_storage_volume.yml index d81640658..d3d561ca4 100644 --- a/ansible_collections/dellemc/openmanage/playbooks/idrac/dellemc_idrac_storage_volume.yml +++ b/ansible_collections/dellemc/openmanage/playbooks/idrac/dellemc_idrac_storage_volume.yml @@ -1,32 +1,29 @@ --- -- hosts: idrac - connection: local - name: iDRAC storage volume configuration. - gather_facts: False - - collections: - - dellemc.openmanage +- name: Storage volume configuration on iDRAC. + hosts: idrac + gather_facts: false tasks: - - name: Create single volume. - dellemc_idrac_storage_volume: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - state: "create" - controller_id: "RAID.Slot.1-1" - volumes: - - drives: - location: [5] - tags: + - name: Create single volume. + dellemc.openmanage.dellemc_idrac_storage_volume: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + state: "create" + controller_id: "RAID.Slot.1-1" + volumes: + - drives: + location: [5] + delegate_to: localhost + tags: - create_single_volume - - - name: Create multiple volume. - dellemc_idrac_storage_volume: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" + + - name: Create multiple volume. + dellemc.openmanage.dellemc_idrac_storage_volume: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" ca_path: "/path/to/ca_cert.pem" raid_reset_config: "True" state: "create" @@ -44,67 +41,74 @@ volumes: - name: "volume_1" drives: - id: ["Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1", - "Disk.Bay.2:Enclosure.Internal.0-1:RAID.Slot.1-1"] + id: + [ + "Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1", + "Disk.Bay.2:Enclosure.Internal.0-1:RAID.Slot.1-1", + ] - name: "volume_2" volume_type: "RAID 5" span_length: 3 - span_depth: 1 + span_depth: 1 drives: - location: [7, 3, 5] + location: [7, 3, 5] disk_cache_policy: "Disabled" write_cache_policy: "WriteBack" read_cache_policy: "NoReadAhead" stripe_size: 131072 capacity: "200" raid_init_operation: "None" - tags: - - create_multiple_volume - - - name: Delete single volume. - dellemc_idrac_storage_volume: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - state: "delete" - volumes: - - name: "volume_1" - tags: + delegate_to: localhost + tags: + - create_multiple_volume + + - name: Delete single volume. + dellemc.openmanage.dellemc_idrac_storage_volume: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + state: "delete" + volumes: + - name: "volume_1" + delegate_to: localhost + tags: - delete_single_volume - - - name: Delete multiple volume. - dellemc_idrac_storage_volume: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - state: "delete" - volumes: - - name: "volume_1" - - name: "volume_2" - tags: + - name: Delete multiple volume. + dellemc.openmanage.dellemc_idrac_storage_volume: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + state: "delete" + volumes: + - name: "volume_1" + - name: "volume_2" + delegate_to: localhost + tags: - delete_multiple_volume - - - name: View specific volume details. - dellemc_idrac_storage_volume: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - state: "view" - controller_id: "RAID.Slot.1-1" - volume_id: "Disk.Virtual.0:RAID.Slot.1-1" - tags: + + - name: View specific volume details. + dellemc.openmanage.dellemc_idrac_storage_volume: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + state: "view" + controller_id: "RAID.Slot.1-1" + volume_id: "Disk.Virtual.0:RAID.Slot.1-1" + delegate_to: localhost + tags: - view_specific_volume - - - name: View all volume details. - dellemc_idrac_storage_volume: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - state: "view" - tags: - - view_all_volume
\ No newline at end of file + + - name: View all volume details. + dellemc.openmanage.dellemc_idrac_storage_volume: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + state: "view" + delegate_to: localhost + tags: + - view_all_volume diff --git a/ansible_collections/dellemc/openmanage/playbooks/idrac/deprecated/dellemc_configure_idrac_eventing.yml b/ansible_collections/dellemc/openmanage/playbooks/idrac/deprecated/dellemc_configure_idrac_eventing.yml index c712288e7..8f4a25086 100644 --- a/ansible_collections/dellemc/openmanage/playbooks/idrac/deprecated/dellemc_configure_idrac_eventing.yml +++ b/ansible_collections/dellemc/openmanage/playbooks/idrac/deprecated/dellemc_configure_idrac_eventing.yml @@ -1,62 +1,58 @@ --- -- hosts: idrac - connection: local - name: Configure the iDRAC eventing attributes - gather_facts: False - - collections: - - dellemc.openmanage +- name: Configure the iDRAC eventing attributes + hosts: idrac + gather_facts: false tasks: - - name: Setup iDRAC SMTP - dellemc_configure_idrac_eventing: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - smtp_ip_address: "0.0.0.0" - authentication: "Enabled" - username: "test" - password: "test" - - tags: - - idrac_smtp - - - name: Setup iDRAC SNMP Trap - dellemc_configure_idrac_eventing: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - snmp_trap_state: "Enabled" - destination_number: "2" - snmp_v3_username: "None" - destination: "1.1.1.1" - - tags: - - idrac_snmptrap - - - name: Setup iDRAC Email Alerts - dellemc_configure_idrac_eventing: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - email_alert_state: "Disabled" - address: "test@test.com" - alert_number: "1" - custom_message: "test" - - tags: - - idrac_email_alerts - - - name: Setup iDRAC Alerts - dellemc_configure_idrac_eventing: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - enable_alerts: "Disabled" - - tags: - - idrac_alerts
\ No newline at end of file + - name: Setup iDRAC SMTP + dellemc.openmanage.dellemc_configure_idrac_eventing: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + smtp_ip_address: "0.0.0.0" + authentication: "Enabled" + username: "test" + password: "test" + delegate_to: localhost + tags: + - idrac_smtp + + - name: Setup iDRAC SNMP Trap + dellemc.openmanage.dellemc_configure_idrac_eventing: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + snmp_trap_state: "Enabled" + destination_number: "2" + snmp_v3_username: "None" + destination: "1.1.1.1" + delegate_to: localhost + tags: + - idrac_snmptrap + + - name: Setup iDRAC Email Alerts + dellemc.openmanage.dellemc_configure_idrac_eventing: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + email_alert_state: "Disabled" + address: "test@test.com" + alert_number: "1" + custom_message: "test" + delegate_to: localhost + tags: + - idrac_email_alerts + + - name: Setup iDRAC Alerts + dellemc.openmanage.dellemc_configure_idrac_eventing: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + enable_alerts: "Disabled" + delegate_to: localhost + tags: + - idrac_alerts diff --git a/ansible_collections/dellemc/openmanage/playbooks/idrac/deprecated/dellemc_configure_idrac_services.yml b/ansible_collections/dellemc/openmanage/playbooks/idrac/deprecated/dellemc_configure_idrac_services.yml index e0d4bbe87..de80ffe89 100644 --- a/ansible_collections/dellemc/openmanage/playbooks/idrac/deprecated/dellemc_configure_idrac_services.yml +++ b/ansible_collections/dellemc/openmanage/playbooks/idrac/deprecated/dellemc_configure_idrac_services.yml @@ -1,46 +1,44 @@ --- -- hosts: idrac - connection: local - name: Configure the iDRAC services attributes - gather_facts: False - - collections: - - dellemc.openmanage +- name: Configure the iDRAC services attributes + hosts: idrac + gather_facts: false tasks: - - name: Setup iDRAC Webserver - dellemc_configure_idrac_services: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - ssl_encryption: "T_168_Bit_or_higher" - tls_protocol: "TLS_1_0_and_Higher" - - tags: - - idrac_webserver + - name: Setup iDRAC Webserver + dellemc.openmanage.dellemc_configure_idrac_services: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + ssl_encryption: "T_168_Bit_or_higher" + tls_protocol: "TLS_1_0_and_Higher" + delegate_to: localhost + tags: + - idrac_webserver - - name: Setup iDRAC SNMP - dellemc_configure_idrac_services: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - snmp_enable: "Enabled" - snmp_protocol: "All" + - name: Setup iDRAC SNMP + dellemc.openmanage.dellemc_configure_idrac_services: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + snmp_enable: "Enabled" + snmp_protocol: "All" + delegate_to: localhost - tags: - - idrac_snmp + tags: + - idrac_snmp - - name: Setup iDRAC SNMP settings - dellemc_configure_idrac_services: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - ipmi_lan: - community_name: public - alert_port: 161 - trap_format: SNMPv3 - tags: - - idrac-snmp-settings + - name: Setup iDRAC SNMP settings + dellemc.openmanage.dellemc_configure_idrac_services: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + ipmi_lan: + community_name: public + alert_port: 161 + trap_format: SNMPv3 + delegate_to: localhost + tags: + - idrac-snmp-settings diff --git a/ansible_collections/dellemc/openmanage/playbooks/idrac/deprecated/dellemc_get_firmware_inventory.yml b/ansible_collections/dellemc/openmanage/playbooks/idrac/deprecated/dellemc_get_firmware_inventory.yml deleted file mode 100644 index ac4736c5f..000000000 --- a/ansible_collections/dellemc/openmanage/playbooks/idrac/deprecated/dellemc_get_firmware_inventory.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -- hosts: idrac - connection: local - name: Get Installed Firmware Inventory - gather_facts: False - - collections: - - dellemc.openmanage - - tasks: - - name: Get Installed Firmware Inventory - dellemc_get_firmware_inventory: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" diff --git a/ansible_collections/dellemc/openmanage/playbooks/idrac/deprecated/dellemc_get_system_inventory.yml b/ansible_collections/dellemc/openmanage/playbooks/idrac/deprecated/dellemc_get_system_inventory.yml deleted file mode 100644 index 085b14bfe..000000000 --- a/ansible_collections/dellemc/openmanage/playbooks/idrac/deprecated/dellemc_get_system_inventory.yml +++ /dev/null @@ -1,16 +0,0 @@ ---- -- hosts: idrac - connection: local - name: Get system inventory - gather_facts: False - - collections: - - dellemc.openmanage - - tasks: - - name: Get system inventory - dellemc_get_system_inventory: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" diff --git a/ansible_collections/dellemc/openmanage/playbooks/idrac/deprecated/dellemc_idrac_lc_attributes.yml b/ansible_collections/dellemc/openmanage/playbooks/idrac/deprecated/dellemc_idrac_lc_attributes.yml index 51a06ad1e..cf3c7eb9f 100644 --- a/ansible_collections/dellemc/openmanage/playbooks/idrac/deprecated/dellemc_idrac_lc_attributes.yml +++ b/ansible_collections/dellemc/openmanage/playbooks/idrac/deprecated/dellemc_idrac_lc_attributes.yml @@ -1,17 +1,14 @@ --- -- hosts: idrac - connection: local - name: Configure iDRAC CSIOR Setting - gather_facts: False - - collections: - - dellemc.openmanage +- name: Configure iDRAC CSIOR Setting + hosts: idrac + gather_facts: false tasks: - - name: Configure iDRAC CSIOR Setting - dellemc_idrac_lc_attributes: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - csior: "Enabled" + - name: Configure iDRAC CSIOR Setting + dellemc.openmanage.dellemc_idrac_lc_attributes: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + csior: "Enabled" + delegate_to: localhost diff --git a/ansible_collections/dellemc/openmanage/playbooks/idrac/deprecated/dellemc_system_lockdown_mode.yml b/ansible_collections/dellemc/openmanage/playbooks/idrac/deprecated/dellemc_system_lockdown_mode.yml index 61260e3eb..9a480db0b 100644 --- a/ansible_collections/dellemc/openmanage/playbooks/idrac/deprecated/dellemc_system_lockdown_mode.yml +++ b/ansible_collections/dellemc/openmanage/playbooks/idrac/deprecated/dellemc_system_lockdown_mode.yml @@ -1,17 +1,14 @@ --- -- hosts: idrac - connection: local - name: Configure System lockdown mode - gather_facts: False - - collections: - - dellemc.openmanage +- name: Configure System lockdown mode + hosts: idrac + gather_facts: false tasks: - - name: Configure System lockdown mode - dellemc_system_lockdown_mode: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - lockdown_mode: "Disabled"
\ No newline at end of file + - name: Configure System lockdown mode + dellemc.openmanage.dellemc_system_lockdown_mode: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + lockdown_mode: "Disabled" + delegate_to: localhost diff --git a/ansible_collections/dellemc/openmanage/playbooks/idrac/deprecated/idrac_network.yml b/ansible_collections/dellemc/openmanage/playbooks/idrac/deprecated/idrac_network.yml index 9ee11728a..0a9b35723 100644 --- a/ansible_collections/dellemc/openmanage/playbooks/idrac/deprecated/idrac_network.yml +++ b/ansible_collections/dellemc/openmanage/playbooks/idrac/deprecated/idrac_network.yml @@ -1,75 +1,71 @@ --- -- hosts: idrac - connection: local - name: Configure the iDRAC network attributes - gather_facts: False - - collections: - - dellemc.openmanage +- name: Configure the iDRAC network attributes + hosts: idrac + gather_facts: false tasks: - - name: Register iDRAC on DNS - idrac_network: - idrac_ip: "{{idrac_ip}}" - idrac_user: "{{idrac_user}}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - register_idrac_on_dns: "Enabled" - dns_idrac_name: "idrac-3CZWCK2" - auto_config: "Enabled" - static_dns: "dell.com" - - tags: - - dns_register - - - name: Setup VLAN attributes - idrac_network: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - setup_idrac_nic_vlan: "Enabled" - - tags: - - setup_vlan - - - name: Setup iDRAC NIC - idrac_network: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - enable_nic: "Enabled" - nic_selection: "Dedicated" - failover_network: "T_None" - auto_detect: "Disabled" - auto_negotiation: "Enabled" - network_speed: "T_1000" - duplex_mode: "Full" - - tags: - - idrac_nic + - name: Register iDRAC on DNS + dellemc.openmanage.idrac_network: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + register_idrac_on_dns: "Enabled" + dns_idrac_name: "idrac-3CZWCK2" + auto_config: "Enabled" + static_dns: "dell.com" + delegate_to: localhost + tags: + - dns_register - - name: Setup iDRAC IPv4 - idrac_network: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - enable_dhcp: "Enabled" - dns_from_dhcp: "Enabled" - enable_ipv4: "Enabled" + - name: Setup VLAN attributes + dellemc.openmanage.idrac_network: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + setup_idrac_nic_vlan: "Enabled" + delegate_to: localhost + tags: + - setup_vlan - tags: - - idrac_ipv4 + - name: Setup iDRAC NIC + dellemc.openmanage.idrac_network: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + enable_nic: "Enabled" + nic_selection: "Dedicated" + failover_network: "T_None" + auto_detect: "Disabled" + auto_negotiation: "Enabled" + network_speed: "T_1000" + duplex_mode: "Full" + delegate_to: localhost + tags: + - idrac_nic - - name: Setup iDRAC Static IPv4 - idrac_network: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - dns_from_dhcp: "Disabled" + - name: Setup iDRAC IPv4 + dellemc.openmanage.idrac_network: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + enable_dhcp: "Enabled" + dns_from_dhcp: "Enabled" + enable_ipv4: "Enabled" + delegate_to: localhost + tags: + - idrac_ipv4 - tags: - - idrac_staticipv4
\ No newline at end of file + - name: Setup iDRAC Static IPv4 + dellemc.openmanage.idrac_network: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + dns_from_dhcp: "Disabled" + delegate_to: localhost + tags: + - idrac_staticipv4 diff --git a/ansible_collections/dellemc/openmanage/playbooks/idrac/deprecated/idrac_timezone_ntp.yml b/ansible_collections/dellemc/openmanage/playbooks/idrac/deprecated/idrac_timezone_ntp.yml index c5fe77911..df3f3ebfb 100644 --- a/ansible_collections/dellemc/openmanage/playbooks/idrac/deprecated/idrac_timezone_ntp.yml +++ b/ansible_collections/dellemc/openmanage/playbooks/idrac/deprecated/idrac_timezone_ntp.yml @@ -1,24 +1,20 @@ --- -- hosts: idrac - connection: local - name: Configure the iDRAC timezone attributes - gather_facts: False - - collections: - - dellemc.openmanage +- name: Configure the iDRAC timezone attributes + hosts: idrac + gather_facts: false tasks: - - name: Setup iDRAC Timezone - idrac_timezone_ntp: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - setup_idrac_timezone: "Singapore" - enable_ntp: "Disabled" - ntp_server_1: "100.100.25.1" - ntp_server_2: "100.100.26.2" - ntp_server_3: "100.100.27.3" - - tags: - - idrac_timezone
\ No newline at end of file + - name: Setup iDRAC Timezone + dellemc.openmanage.idrac_timezone_ntp: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + setup_idrac_timezone: "Singapore" + enable_ntp: "Disabled" + ntp_server_1: "100.100.25.1" + ntp_server_2: "100.100.26.2" + ntp_server_3: "100.100.27.3" + delegate_to: localhost + tags: + - idrac_timezone diff --git a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_attributes.yml b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_attributes.yml index 9a3621761..a19f085a4 100644 --- a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_attributes.yml +++ b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_attributes.yml @@ -1,25 +1,22 @@ --- -- hosts: idrac - connection: local - name: Dell OpenManage Ansible iDRAC Certificates management. - gather_facts: False - - collections: - - dellemc.openmanage +- name: Dell OpenManage Ansible iDRAC Certificates management. + hosts: idrac + gather_facts: false tasks: - name: Update iDRAC attributes - idrac_attributes: + dellemc.openmanage.idrac_attributes: idrac_ip: "{{ idrac_ip }}" idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" + idrac_password: "{{ idrac_password }}" ca_path: "/path/to/ca_cert.pem" idrac_attributes: SNMP.1.AgentCommunity: Enabled tags: idrac + delegate_to: localhost - name: Update System attributes - idrac_attributes: + dellemc.openmanage.idrac_attributes: idrac_ip: "{{ idrac_ip }}" idrac_user: "{{ idrac_user }}" idrac_password: "{{ idrac_password }}" @@ -27,9 +24,10 @@ system_attributes: ThermalSettings.1.ThermalProfile: Sound Cap tags: system + delegate_to: localhost - name: Update Lifecycle Controller attributes - idrac_attributes: + dellemc.openmanage.idrac_attributes: idrac_ip: "{{ idrac_ip }}" idrac_user: "{{ idrac_user }}" idrac_password: "{{ idrac_password }}" @@ -37,9 +35,10 @@ lifecycle_controller_attributes: LCAttributes.1.AutoUpdate: Enabled tags: lc + delegate_to: localhost - name: Configure the iDRAC attributes for email alert settings. - idrac_attributes: + dellemc.openmanage.idrac_attributes: idrac_ip: "{{ idrac_ip }}" idrac_user: "{{ idrac_user }}" idrac_password: "{{ idrac_password }}" @@ -49,9 +48,10 @@ EmailAlert.1.Enable: Enabled EmailAlert.1.Address: test@test.com tags: email-alerts + delegate_to: localhost - name: Configure the iDRAC attributes for SNMP alert settings. - idrac_attributes: + dellemc.openmanage.idrac_attributes: idrac_ip: "{{ idrac_ip }}" idrac_user: "{{ idrac_user }}" idrac_password: "{{ idrac_password }}" @@ -61,9 +61,10 @@ SNMPAlert.1.State: Enabled SNMPAlert.1.SNMPv3Username: username tags: snmp-alerts + delegate_to: localhost - name: Configure the iDRAC attributes for SMTP alert settings. - idrac_attributes: + dellemc.openmanage.idrac_attributes: idrac_ip: "{{ idrac_ip }}" idrac_user: "{{ idrac_user }}" idrac_password: "{{ idrac_password }}" @@ -75,9 +76,10 @@ RemoteHosts.1.SMTPUserName: username RemoteHosts.1.SMTPPassword: password tags: smtp-alerts + delegate_to: localhost - name: Configure the iDRAC attributes for webserver settings. - idrac_attributes: + dellemc.openmanage.idrac_attributes: idrac_ip: "{{ idrac_ip }}" idrac_user: "{{ idrac_user }}" idrac_password: "{{ idrac_password }}" @@ -86,9 +88,10 @@ WebServer.1.SSLEncryptionBitLength: 128-Bit or higher WebServer.1.TLSProtocol: TLS 1.1 and Higher tags: webserver-settings + delegate_to: localhost - name: Configure the iDRAC attributes for SNMP settings. - idrac_attributes: + dellemc.openmanage.idrac_attributes: idrac_ip: "{{ idrac_ip }}" idrac_user: "{{ idrac_user }}" idrac_password: "{{ idrac_password }}" @@ -100,9 +103,10 @@ SNMP.1.AlertPort: 162 SNMP.1.AgentCommunity: public tags: snmp-settings + delegate_to: localhost - name: Configure the iDRAC LC attributes for collecting system inventory. - idrac_attributes: + dellemc.openmanage.idrac_attributes: idrac_ip: "{{ idrac_ip }}" idrac_user: "{{ idrac_user }}" idrac_password: "{{ idrac_password }}" @@ -110,9 +114,10 @@ lifecycle_controller_attributes: LCAttributes.1.CollectSystemInventoryOnRestart: Enabled tags: collect-inventory + delegate_to: localhost - name: Configure the iDRAC system attributes for LCD settings. - idrac_attributes: + dellemc.openmanage.idrac_attributes: idrac_ip: "192.168.0.1" idrac_user: "user_name" idrac_password: "user_password" @@ -123,20 +128,22 @@ LCD.1.FrontPanelLocking: Full-Access LCD.1.UserDefinedString: custom lcd string tags: lcd-config + delegate_to: localhost - name: Configure the iDRAC attributes for Timezone settings. - idrac_attributes: + dellemc.openmanage.idrac_attributes: idrac_ip: "192.168.0.1" idrac_user: "user_name" idrac_password: "user_password" ca_path: "/path/to/ca_cert.pem" idrac_attributes: - Time.1.TimeZone: CST6CDT + Time.1.Timezone: CST6CDT NTPConfigGroup.1.NTPEnable: Enabled NTPConfigGroup.1.NTP1: 192.168.0.5 NTPConfigGroup.1.NTP2: 192.168.0.6 NTPConfigGroup.1.NTP3: 192.168.0.7 tags: timezone-settings + delegate_to: localhost - name: Configure all attributes dellemc.openmanage.idrac_attributes: @@ -153,3 +160,4 @@ lifecycle_controller_attributes: LCAttributes.1.AutoUpdate: Disabled tags: all-attributes + delegate_to: localhost diff --git a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_bios.yml b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_bios.yml index a541dce7a..feb8eb7e7 100644 --- a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_bios.yml +++ b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_bios.yml @@ -1,115 +1,119 @@ --- -- hosts: idrac - connection: local - name: Configure Boot Mode Setting - gather_facts: False - - collections: - - dellemc.openmanage +- name: Configure Boot Mode Setting + hosts: idrac + gather_facts: false tasks: - - name: Configure Bios Generic Attributes - idrac_bios: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - attributes: - BootMode: "Bios" - OneTimeBootMode: "Enabled" - BootSeqRetry: "Enabled" - tags: + - name: Configure Bios Generic Attributes + dellemc.openmanage.idrac_bios: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + attributes: + BootMode: "Bios" + OneTimeBootMode: "Enabled" + BootSeqRetry: "Enabled" + tags: - bootconfig - - - name: Configure PXE Generic Attributes - idrac_bios: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - attributes: - PxeDev1EnDis: "Enabled" - PxeDev1Protocol: "IPV4" - PxeDev1VlanEnDis: "Enabled" - PxeDev1VlanId: x - PxeDev1Interface: "NIC.Embedded.x-x-x" - PxeDev1VlanPriority: x - tags: + delegate_to: localhost + + - name: Configure PXE Generic Attributes + dellemc.openmanage.idrac_bios: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + attributes: + PxeDev1EnDis: "Enabled" + PxeDev1Protocol: "IPV4" + PxeDev1VlanEnDis: "Enabled" + PxeDev1VlanId: x + PxeDev1Interface: "NIC.Embedded.x-x-x" + PxeDev1VlanPriority: x + tags: - pxeconfig + delegate_to: localhost - - name: Configure attributes of the BIOS at Maintenance window - idrac_bios: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - apply_time: AtMaintenanceWindowStart - maintenance_window: - start_time: "2022-09-30T05:15:40-05:00" - duration: 600 - attributes: - BootMode: "Bios" - OneTimeBootMode: "Enabled" - BootSeqRetry: "Enabled" - tags: + - name: Configure attributes of the BIOS at Maintenance window + dellemc.openmanage.idrac_bios: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + apply_time: AtMaintenanceWindowStart + maintenance_window: + start_time: "2022-09-30T05:15:40-05:00" + duration: 600 + attributes: + BootMode: "Bios" + OneTimeBootMode: "Enabled" + BootSeqRetry: "Enabled" + tags: - at_maintenance_start + delegate_to: localhost - - name: Clear pending BIOS attributes - idrac_bios: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - clear_pending: yes - tags: - - clear_pending + - name: Clear pending BIOS attributes + dellemc.openmanage.idrac_bios: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + clear_pending: true + tags: + - clear_pending + delegate_to: localhost - - name: Reset BIOS attributes to default settings. - idrac_bios: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_pwd }}" - ca_path: "/path/to/ca_cert.pem" - reset_bios: yes - tags: - - reset_bios + - name: Reset BIOS attributes to default settings. + dellemc.openmanage.idrac_bios: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_pwd }}" + ca_path: "/path/to/ca_cert.pem" + reset_bios: true + tags: + - reset_bios + delegate_to: localhost - - name: Configure Boot Sources - idrac_bios: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - boot_sources: - - Name: "NIC.Integrated.x-x-x" - Enabled: true - Index: 1 - - Name: "NIC.Integrated.x-x-x" - Enabled: true - Index: 0 - tags: + - name: Configure Boot Sources + dellemc.openmanage.idrac_bios: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + boot_sources: + - Name: "NIC.Integrated.x-x-x" + Enabled: true + Index: 1 + - Name: "NIC.Integrated.x-x-x" + Enabled: true + Index: 0 + tags: - boot_sources + delegate_to: localhost - - name: Configure Boot Sources - Enabled - idrac_bios: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - boot_sources: - - Name: "HardDisk.List.1-1" - Enabled: true - tags: + - name: Configure Boot Sources - Enabled + dellemc.openmanage.idrac_bios: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + boot_sources: + - Name: "HardDisk.List.1-1" + Enabled: true + tags: - boot_sources_enabled + delegate_to: localhost - - name: Configure Boot Sources - Index - idrac_bios: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - boot_sources: - - Name: "NIC.Integrated.x-x-x" - Index: 1 - tags: - - boot_sources_index
\ No newline at end of file + - name: Configure Boot Sources - Index + dellemc.openmanage.idrac_bios: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + boot_sources: + - Name: "NIC.Integrated.x-x-x" + Index: 1 + tags: + - boot_sources_index + delegate_to: localhost diff --git a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_boot.yml b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_boot.yml index 22afb949a..f6f3ac2b1 100644 --- a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_boot.yml +++ b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_boot.yml @@ -1,69 +1,69 @@ --- -- hosts: idrac - connection: local - name: Configure the boot order settings - gather_facts: False - - collections: - - dellemc.openmanage +- name: Configure the boot order settings + hosts: idrac + gather_facts: false tasks: + - name: Configure the system boot options settings. + dellemc.openmanage.idrac_boot: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + boot_options: + - display_name: Hard drive C + enabled: true + - boot_option_reference: NIC.PxeDevice.2-1 + enabled: true + tags: boot-option + delegate_to: localhost - - name: Configure the system boot options settings. - idrac_boot: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - boot_options: - - display_name: Hard drive C - enabled: true - - boot_option_reference: NIC.PxeDevice.2-1 - enabled: true - tags: boot-option - - - name: Configure the boot order settings. - idrac_boot: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - boot_order: - - Boot0001 - - Boot0002 - - Boot0004 - - Boot0003 - tags: boot-order + - name: Configure the boot order settings. + dellemc.openmanage.idrac_boot: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + boot_order: + - Boot0001 + - Boot0002 + - Boot0004 + - Boot0003 + tags: boot-order + delegate_to: localhost - - name: Configure the boot source override mode. - idrac_boot: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - boot_source_override_mode: legacy - boot_source_override_target: cd - boot_source_override_enabled: once - tags: boot-mode + - name: Configure the boot source override mode. + dellemc.openmanage.idrac_boot: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + boot_source_override_mode: legacy + boot_source_override_target: cd + boot_source_override_enabled: once + tags: boot-mode + delegate_to: localhost - - name: Configure the UEFI target settings. - idrac_boot: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - boot_source_override_mode: uefi - boot_source_override_target: uefi_target - uefi_target_boot_source_override: "VenHw(3A191845-5F86-4E78-8FCE-C4CFF59F9DAA)" - tags: uefi-target + - name: Configure the UEFI target settings. + dellemc.openmanage.idrac_boot: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + boot_source_override_mode: uefi + boot_source_override_target: uefi_target + uefi_target_boot_source_override: "VenHw(3A191845-5F86-4E78-8FCE-C4CFF59F9DAA)" + tags: uefi-target + delegate_to: localhost - - name: Configure the boot source override mode as pxe. - idrac_boot: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - boot_source_override_mode: legacy - boot_source_override_target: pxe - boot_source_override_enabled: continuous - tags: pxe-boot-mode + - name: Configure the boot source override mode as pxe. + dellemc.openmanage.idrac_boot: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + boot_source_override_mode: legacy + boot_source_override_target: pxe + boot_source_override_enabled: continuous + tags: pxe-boot-mode + delegate_to: localhost diff --git a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_boot_virtual_media_workflow.yml b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_boot_virtual_media_workflow.yml index aa6d43ed5..fcf13d9be 100644 --- a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_boot_virtual_media_workflow.yml +++ b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_boot_virtual_media_workflow.yml @@ -1,7 +1,6 @@ --- -- hosts: idrac - connection: local - name: Dell OpenManage Ansible iDRAC boot operations. +- name: Dell OpenManage Ansible iDRAC boot operations. + hosts: idrac vars: ansible_python_interpreter: /usr/bin/python3 virtual_media_uri: "/redfish/v1/Managers/iDRAC.Embedded.1/VirtualMedia/CD/Actions/VirtualMedia.InsertMedia" @@ -9,48 +8,48 @@ nfs_dir: "192.168.0.1:/nfsshare" iso_file: "boot_image.iso" ca_path: "/path/to/ca_cert.pem" - boot_source_mode: "legacy" #other options are UEFI + boot_source_mode: "legacy" # other options are UEFI - gather_facts: False + gather_facts: false tasks: + # Mount the ISO image as a virtual media CD. + - name: "Insert virtual media" + ansible.builtin.uri: + url: "https://{{ idrac_ip }}{{ virtual_media_uri }}" + user: "{{ idrac_user }}" + password: "{{ idrac_password }}" + method: "POST" + body_format: json + body: + Image: "{{ file_location }}" + Inserted: true + WriteProtected: true + use_proxy: true + status_code: 204 + return_content: false + ca_path: "{{ ca_path }}" + force_basic_auth: true + headers: + Content-Type: "application/json" + Accept: "application/json" + tags: + - virtual_media + - vm_boot + delegate_to: localhost -# Mount the ISO image as a virtual media CD. - - name: "Insert virtual media" - ansible.builtin.uri: - url: "https://{{ idrac_ip }}{{ virtual_media_uri }}" - user: "{{ idrac_user }}" - password: "{{ idrac_password }}" - method: "POST" - body_format: json - body: - Image: "{{ file_location }}" - Inserted: true - WriteProtected: true - use_proxy: yes - status_code: 204 - return_content: no - ca_path: "{{ ca_path }}" - force_basic_auth: yes - headers: - Content-Type: "application/json" - Accept: "application/json" - tags: - - virtual_media - - vm_boot - -# One-time boot with virtual media. - - name: Boot once from mounted CD. - dellemc.openmanage.idrac_boot: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "{{ ca_path }}" - boot_source_override_mode: "{{ boot_source_mode }}" - boot_source_override_target: cd - boot_source_override_enabled: once - tags: - - boot_cd - - vm_boot - + # One-time boot with virtual media. + - name: Boot once from mounted CD. + dellemc.openmanage.idrac_boot: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "{{ ca_path }}" + boot_source_override_mode: "{{ boot_source_mode }}" + boot_source_override_target: cd + boot_source_override_enabled: once + tags: + - boot_cd + - vm_boot + delegate_to: localhost # Eject the virtual media after boot. diff --git a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_certificates.yml b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_certificates.yml index 801f12ed5..c32ac21bd 100644 --- a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_certificates.yml +++ b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_certificates.yml @@ -1,21 +1,17 @@ --- -- hosts: idrac - connection: local - name: Dell OpenManage Ansible iDRAC Certificates management. - gather_facts: False - - collections: - - dellemc.openmanage +- name: Dell OpenManage Ansible iDRAC Certificates management. + hosts: idrac + gather_facts: false tasks: - name: Generate https signing request - idrac_certificates: + dellemc.openmanage.idrac_certificates: idrac_ip: "{{ idrac_ip }}" idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" + idrac_password: "{{ idrac_password }}" ca_path: "/path/to/ca_cert.pem" - command: "generate_csr" - certificate_type: "HTTPS" + command: "generate_csr" + certificate_type: "HTTPS" certificate_path: "/home/omam/mycert_dir" cert_params: common_name: "sample.domain.com" @@ -27,43 +23,72 @@ organization_name: "OrgName" subject_alt_name: - 192.198.2.1 + delegate_to: localhost - name: Import a SSL certificate. - idrac_certificates: + dellemc.openmanage.idrac_certificates: idrac_ip: "{{ idrac_ip }}" idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" + idrac_password: "{{ idrac_password }}" ca_path: "/path/to/ca_cert.pem" command: "import" certificate_type: "HTTPS" certificate_path: "/path/to/cert.pem" + delegate_to: localhost + + - name: Import an HTTPS certificate along with its private key. + dellemc.openmanage.idrac_certificates: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + command: "import" + certificate_type: "HTTPS" + certificate_path: "/path/to/cert.pem" + ssl_key: "/path/to/private_key.pem" + delegate_to: localhost - name: Export a SSL certificate. - idrac_certificates: + dellemc.openmanage.idrac_certificates: idrac_ip: "{{ idrac_ip }}" idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" + idrac_password: "{{ idrac_password }}" ca_path: "/path/to/ca_cert.pem" command: "export" certificate_type: "HTTPS" certificate_path: "/home/omam/mycert_dir" + delegate_to: localhost - name: Import a CSC certificate. - idrac_certificates: + dellemc.openmanage.idrac_certificates: idrac_ip: "{{ idrac_ip }}" idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" + idrac_password: "{{ idrac_password }}" ca_path: "/path/to/ca_cert.pem" command: "import" certificate_type: "CSC" - certificate_file: "/path/to/cert.pem" + certificate_path: "/path/to/cert.pem" + delegate_to: localhost + + - name: Import a custom certificate with a passphrase. + dellemc.openmanage.idrac_certificates: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + command: "import" + certificate_type: "CUSTOMCERTIFICATE" + certificate_path: "/path/to/idrac_cert.p12" + passphrase: "cert_passphrase" + reset: false + delegate_to: localhost - name: Export a Client trust certificate. - idrac_certificates: + dellemc.openmanage.idrac_certificates: idrac_ip: "{{ idrac_ip }}" idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" + idrac_password: "{{ idrac_password }}" ca_path: "/path/to/ca_cert.pem" command: "export" certificate_type: "CLIENT_TRUST_CERTIFICATE" - certificate_path: "/home/omam/mycert_dir"
\ No newline at end of file + certificate_path: "/home/omam/mycert_dir" + delegate_to: localhost diff --git a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_firmware.yml b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_firmware.yml index c1a2c891e..dbb3e315f 100644 --- a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_firmware.yml +++ b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_firmware.yml @@ -1,69 +1,88 @@ --- -- hosts: idrac - connection: local - name: Update Firmware Inventory - gather_facts: False - - collections: - - dellemc.openmanage +- name: Update Firmware Inventory + hosts: idrac + gather_facts: false tasks: - - name: Update firmware from repository on a HTTP/HTTP/FTP repository - idrac_firmware: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - share_name: "https://downloads.dell.com" - reboot: True - job_wait: True - apply_update: True + - name: Update firmware from repository on a HTTP/HTTP/FTP repository + dellemc.openmanage.idrac_firmware: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + share_name: "https://downloads.dell.com" + reboot: true + job_wait: true + apply_update: true + delegate_to: localhost + + - name: Update firmware from repository on a HTTP/HTTP/FTP repository via proxy + dellemc.openmanage.idrac_firmware: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + share_name: "https://downloads.dell.com" + reboot: true + job_wait: true + apply_update: true + proxy_support: ParametersProxy + proxy_server: 192.168.1.10 + proxy_type: HTTP + proxy_port: 80 + proxy_uname: "proxy_user" + proxy_passwd: "proxy_pwd" + delegate_to: localhost - - name: Update firmware from repository on a internally hosted HTTP repository. - idrac_firmware: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password}}" - ca_path: "/path/to/ca_cert.pem" - share_name: "http://192.168.0.1/path_to_folder/" - reboot: True - job_wait: True - apply_update: True - catalog_file_name: "Catalog.xml" + - name: Update firmware from repository on a internally hosted HTTP repository. + dellemc.openmanage.idrac_firmware: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + share_name: "http://192.168.0.1/path_to_folder/" + reboot: true + job_wait: true + apply_update: true + catalog_file_name: "Catalog.xml" + delegate_to: localhost - - name: Update firmware from repository on a NFS Share - idrac_firmware: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password}}" - ca_path: "/path/to/ca_cert.pem" - share_name: "192.168.0.1:/complete_share_path" - reboot: True - job_wait: True - apply_update: True - catalog_file_name: "Catalog.xml" + - name: Update firmware from repository on a NFS Share + dellemc.openmanage.idrac_firmware: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + share_name: "192.168.0.1:/complete_share_path" + reboot: true + job_wait: true + apply_update: true + catalog_file_name: "Catalog.xml" + delegate_to: localhost - - name: Update firmware from repository on a CIFS Share - idrac_firmware: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password}}" - ca_path: "/path/to/ca_cert.pem" - share_name: "\\\\192.168.0.1\\share_path" - share_user: "{{ share_user }}" - share_password: "{{ share_password }}" - share_mnt: "/mnt/cifs_share" - reboot: False - job_wait: True - catalog_file_name: "Catalog.xml" + - name: Update firmware from repository on a CIFS Share + dellemc.openmanage.idrac_firmware: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + share_name: "\\\\192.168.0.1\\share_path" + share_user: "{{ share_user }}" + share_password: "{{ share_password }}" + share_mnt: "/mnt/cifs_share" + reboot: false + job_wait: true + catalog_file_name: "Catalog.xml" + delegate_to: localhost - - name: Firmware compliance report using HTTPS repository. - idrac_firmare: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - share_name: "https://downloads.dell.com" - reboot: False - job_wait: True - apply_update: False + - name: Firmware compliance report using HTTPS repository. + dellemc.openmanage.idrac_firmware: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + share_name: "https://downloads.dell.com" + reboot: false + job_wait: true + apply_update: false + delegate_to: localhost diff --git a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_firmware_info.yml b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_firmware_info.yml index aaca53a58..b19baec42 100644 --- a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_firmware_info.yml +++ b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_firmware_info.yml @@ -1,16 +1,13 @@ --- -- hosts: idrac - connection: local - name: Get Installed Firmware Inventory - gather_facts: False - - collections: - - dellemc.openmanage +- name: Get Installed Firmware Inventory + hosts: idrac + gather_facts: false tasks: - - name: Get Installed Firmware Inventory. - idrac_firmware_info: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" + - name: Get Installed Firmware Inventory. + dellemc.openmanage.idrac_firmware_info: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + delegate_to: localhost diff --git a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_license.yml b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_license.yml new file mode 100644 index 000000000..2304fa5b6 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_license.yml @@ -0,0 +1,183 @@ +--- +- name: Dell OpenManage Ansible iDRAC License Management. + hosts: idrac + gather_facts: false + + tasks: + - name: Export a license from iDRAC to local + dellemc.openmanage.idrac_license: + idrac_ip: "192.168.0.1" + idrac_user: "username" + idrac_password: "password" + ca_path: "/path/to/ca_cert.pem" + license_id: "LICENSE_123" + export: true + share_parameters: + share_type: "local" + share_name: "/path/to/share" + file_name: "license_file" + delegate_to: localhost + + - name: Export a license from iDRAC to NFS share + dellemc.openmanage.idrac_license: + idrac_ip: "192.168.0.1" + idrac_user: "username" + idrac_password: "password" + ca_path: "/path/to/ca_cert.pem" + license_id: "LICENSE_123" + export: true + share_parameters: + share_type: "nfs" + share_name: "/path/to/share" + file_name: "license_file" + ip_address: "192.168.0.1" + delegate_to: localhost + + - name: Export a license from iDRAC to CIFS share + dellemc.openmanage.idrac_license: + idrac_ip: "192.168.0.1" + idrac_user: "username" + idrac_password: "password" + ca_path: "/path/to/ca_cert.pem" + license_id: "LICENSE_123" + export: true + share_parameters: + share_type: "cifs" + share_name: "/path/to/share" + file_name: "license_file" + ip_address: "192.168.0.1" + username: "username" + password: "password" + workgroup: "workgroup" + delegate_to: localhost + + - name: Export a license from iDRAC to HTTP share via proxy + dellemc.openmanage.idrac_license: + idrac_ip: "192.168.0.1" + idrac_user: "username" + idrac_password: "password" + ca_path: "/path/to/ca_cert.pem" + license_id: "LICENSE_123" + export: true + share_parameters: + share_type: "http" + share_name: "/path/to/share" + file_name: "license_file" + ip_address: "192.168.0.1" + username: "username" + password: "password" + proxy_support: "parameters_proxy" + proxy_type: socks + proxy_server: "192.168.0.2" + proxy_port: 1080 + proxy_username: "proxy_username" + proxy_password: "proxy_password" + delegate_to: localhost + + - name: Export a license from iDRAC to HTTPS share + dellemc.openmanage.idrac_license: + idrac_ip: "192.168.0.1" + idrac_user: "username" + idrac_password: "password" + ca_path: "/path/to/ca_cert.pem" + license_id: "LICENSE_123" + export: true + share_parameters: + share_type: "https" + share_name: "/path/to/share" + file_name: "license_file" + ip_address: "192.168.0.1" + username: "username" + password: "password" + ignore_certificate_warning: "on" + delegate_to: localhost + + - name: Import a license to iDRAC from local + dellemc.openmanage.idrac_license: + idrac_ip: 198.162.0.1 + idrac_user: "username" + idrac_password: "password" + ca_path: "/path/to/ca_cert.pem" + import: true + share_parameters: + file_name: "license_file_name.xml" + share_type: local + share_name: "/path/to/share" + delegate_to: localhost + + - name: Import a license to iDRAC from NFS share + dellemc.openmanage.idrac_license: + idrac_ip: 198.162.0.1 + idrac_user: "username" + idrac_password: "password" + ca_path: "/path/to/ca_cert.pem" + import: true + share_parameters: + file_name: "license_file_name.xml" + share_type: nfs + ip_address: "192.168.0.1" + share_name: "/path/to/share" + delegate_to: localhost + + - name: Import a license to iDRAC from CIFS share + dellemc.openmanage.idrac_license: + idrac_ip: 198.162.0.1 + idrac_user: "username" + idrac_password: "password" + ca_path: "/path/to/ca_cert.pem" + import: true + share_parameters: + file_name: "license_file_name.xml" + share_type: cifs + ip_address: "192.168.0.1" + share_name: "/path/to/share" + username: "username" + password: "password" + delegate_to: localhost + + - name: Import a license to iDRAC from HTTP share + dellemc.openmanage.idrac_license: + idrac_ip: 198.162.0.1 + idrac_user: "username" + idrac_password: "password" + ca_path: "/path/to/ca_cert.pem" + import: true + share_parameters: + file_name: "license_file_name.xml" + share_type: http + ip_address: "192.168.0.1" + share_name: "/path/to/share" + username: "username" + password: "password" + delegate_to: localhost + + - name: Import a license to iDRAC from HTTPS share via proxy + dellemc.openmanage.idrac_license: + idrac_ip: 198.162.0.1 + idrac_user: "username" + idrac_password: "password" + ca_path: "/path/to/ca_cert.pem" + import: true + share_parameters: + file_name: "license_file_name.xml" + share_type: https + ip_address: "192.168.0.1" + share_name: "/path/to/share" + username: "username" + password: "password" + proxy_support: "parameters_proxy" + proxy_server: "192.168.0.2" + proxy_port: 808 + proxy_username: "proxy_username" + proxy_password: "proxy_password" + delegate_to: localhost + + - name: Delete a License from iDRAC + dellemc.openmanage.idrac_license: + idrac_ip: 198.162.0.1 + idrac_user: "username" + idrac_password: "password" + ca_path: "/path/to/ca_cert.pem" + license_id: "LICENCE_123" + delete: true + delegate_to: localhost diff --git a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_lifecycle_controller_job_status_info.yml b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_lifecycle_controller_job_status_info.yml index 9f0f61deb..a1a95f19e 100644 --- a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_lifecycle_controller_job_status_info.yml +++ b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_lifecycle_controller_job_status_info.yml @@ -1,17 +1,14 @@ --- -- hosts: idrac - connection: local - name: Get LC job Status - gather_facts: False - - collections: - - dellemc.openmanage +- name: Get LC job Status + hosts: idrac + gather_facts: false tasks: - - name: Get LC job Status - idrac_lifecycle_controller_job_status_info: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - job_id: "JID_844222910040" + - name: Get LC job Status + dellemc.openmanage.idrac_lifecycle_controller_job_status_info: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + job_id: "JID_844222910040" + delegate_to: localhost diff --git a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_lifecycle_controller_jobs.yml b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_lifecycle_controller_jobs.yml index 495e84a66..ca78d8f91 100644 --- a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_lifecycle_controller_jobs.yml +++ b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_lifecycle_controller_jobs.yml @@ -1,28 +1,26 @@ --- -- hosts: idrac - connection: local - name: Delete LC job - gather_facts: False - - collections: - - dellemc.openmanage +- name: Delete LC job + hosts: idrac + gather_facts: false tasks: - - name: Delete LC job Queue - idrac_lifecycle_controller_jobs: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - tags: - - delete_all_jobs + - name: Delete LC job Queue + dellemc.openmanage.idrac_lifecycle_controller_jobs: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + tags: + - delete_all_jobs + delegate_to: localhost - - name: Delete a LC job - idrac_lifecycle_controller_jobs: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - job_id: "JID_123456789" - tags: - - delete_job
\ No newline at end of file + - name: Delete a LC job + dellemc.openmanage.idrac_lifecycle_controller_jobs: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + job_id: "JID_123456789" + tags: + - delete_job + delegate_to: localhost diff --git a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_lifecycle_controller_logs.yml b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_lifecycle_controller_logs.yml index 99c9d0cef..8cda54fe6 100644 --- a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_lifecycle_controller_logs.yml +++ b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_lifecycle_controller_logs.yml @@ -1,18 +1,15 @@ --- -- hosts: idrac - connection: local - name: Export Lifecycle Controller Logs - gather_facts: False - - collections: - - dellemc.openmanage +- name: Export Lifecycle Controller Logs + hosts: idrac + gather_facts: false tasks: - - name: Export Lifecycle Controller Logs - idrac_lifecycle_controller_logs: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - share_name: "{{ playbook_dir }}" - job_wait: "True"
\ No newline at end of file + - name: Export Lifecycle Controller Logs + dellemc.openmanage.idrac_lifecycle_controller_logs: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + share_name: "{{ playbook_dir }}" + job_wait: true + delegate_to: localhost diff --git a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_lifecycle_controller_status_info.yml b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_lifecycle_controller_status_info.yml index 1798ab99e..a68a37187 100644 --- a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_lifecycle_controller_status_info.yml +++ b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_lifecycle_controller_status_info.yml @@ -1,16 +1,13 @@ --- -- hosts: idrac - connection: local - name: Check LC Ready Status - gather_facts: False - - collections: - - dellemc.openmanage +- name: Check LC Ready Status + hosts: idrac + gather_facts: false tasks: - - name: Check LC Ready Status - idrac_lifecycle_controller_status_info: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" + - name: Check LC Ready Status + dellemc.openmanage.idrac_lifecycle_controller_status_info: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + delegate_to: localhost diff --git a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_network_attributes.yml b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_network_attributes.yml new file mode 100644 index 000000000..006172964 --- /dev/null +++ b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_network_attributes.yml @@ -0,0 +1,139 @@ +--- +- name: Dell OpenManage Ansible iDRAC Network Attributes. + hosts: idrac + gather_facts: false + + tasks: + - name: Configure OEM network attributes + dellemc.openmanage.idrac_network_attributes: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + network_adapter_id: "NIC.Integrated.1" + network_device_function_id: "NIC.Integrated.1-1-1" + apply_time: "Immediate" + oem_network_attributes: + BannerMessageTimeout: "4" + delegate_to: localhost + + - name: Configure OEM network attributes to apply on reset + dellemc.openmanage.idrac_network_attributes: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + network_adapter_id: NIC.Integrated.1 + network_device_function_id: "NIC.Integrated.1-1-1" + oem_network_attributes: + BannerMessageTimeout: "4" + apply_time: OnReset + maintenance_window: + start_time: "2022-09-30T05:15:40-05:00" + duration: 600 + delegate_to: localhost + + - name: Configure OEM network attributes to apply at maintainance window + dellemc.openmanage.idrac_network_attributes: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + network_adapter_id: NIC.Integrated.1 + network_device_function_id: "NIC.Integrated.1-1-1" + oem_network_attributes: + BannerMessageTimeout: "4" + apply_time: AtMaintenanceWindowStart + maintenance_window: + start_time: "2022-09-30T05:15:40-05:00" + duration: 600 + delegate_to: localhost + + - name: Clearing the OEM pending attributes + dellemc.openmanage.idrac_network_attributes: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + network_adapter_id: NIC.Integrated.1 + network_device_function_id: "NIC.Integrated.1-1-1" + apply_time: "Immediate" + clear_pending: true + delegate_to: localhost + + - name: Configure OEM network attributes and wait for the job + dellemc.openmanage.idrac_network_attributes: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + network_adapter_id: NIC.Integrated.1 + network_device_function_id: "NIC.Integrated.1-1-1" + apply_time: "Immediate" + oem_network_attributes: + LnkSpeed: "10MbpsHalf" + WakeOnLan: "Enabled" + VLanMode: "Enabled" + job_wait: true + job_wait_timeout: 2000 + delegate_to: localhost + + - name: Configure redfish network attributes to update fiber channel on reset + dellemc.openmanage.idrac_network_attributes: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + network_adapter_id: NIC.Integrated.1 + network_device_function_id: "NIC.Integrated.1-1-1" + apply_time: OnReset + network_attributes: + Ethernet: + VLAN: + VLANEnable: true + delegate_to: localhost + + - name: Configure redfish network attributes to apply on reset + dellemc.openmanage.idrac_network_attributes: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + network_adapter_id: NIC.Integrated.1 + network_device_function_id: "NIC.Integrated.1-1-1" + network_attributes: + Ethernet: + VLAN: + VLANEnable: true + apply_time: OnReset + maintenance_window: + start_time: "2022-09-30T05:15:40-05:00" + duration: 600 + delegate_to: localhost + + - name: Configure redfish network attributes of iscsi to apply at maintainance window start + dellemc.openmanage.idrac_network_attributes: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + network_adapter_id: NIC.Integrated.1 + network_device_function_id: "NIC.Integrated.1-1-1" + network_attributes: + iSCSIBoot: + InitiatorIPAddress: 1.0.0.1 + apply_time: AtMaintenanceWindowStart + maintenance_window: + start_time: "2022-09-30T05:15:40-05:00" + duration: 600 + delegate_to: localhost + + - name: Configure redfish network attributes to apply at maintainance window on reset + dellemc.openmanage.idrac_network_attributes: + idrac_ip: "192.168.0.1" + idrac_user: "user_name" + idrac_password: "user_password" + network_adapter_id: NIC.Integrated.1 + network_device_function_id: "NIC.Integrated.1-1-1" + network_attributes: + Ethernet: + VLAN: + VLANEnable: false + VLANId: 1 + apply_time: AtMaintenanceWindowStart + maintenance_window: + start_time: "2022-09-30T05:15:40-05:00" + duration: 600 + delegate_to: localhost diff --git a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_os_deployment.yml b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_os_deployment.yml index 3ad52adc1..fa5d3ef04 100644 --- a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_os_deployment.yml +++ b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_os_deployment.yml @@ -1,22 +1,18 @@ ---- -- hosts: idrac - connection: local +--- +- name: Booting to Network Operating System image + hosts: idrac gather_facts: false - name: Booting to Network Operating System image - collections: - - dellemc.openmanage - - tasks: + tasks: - name: "Booting to Network Operating System image" - idrac_os_deployment: + dellemc.openmanage.idrac_os_deployment: idrac_ip: "{{ idrac_ip }}" idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" + idrac_password: "{{ idrac_password }}" ca_path: "/path/to/ca_cert.pem" share_name: "{{ playbook_dir }}" - iso_image: "uninterrupted_os_installation_image.iso." + iso_image: "uninterrupted_os_installation_image.iso." expose_duration: 180 - + delegate_to: localhost tags: - - network_iso
\ No newline at end of file + - network_iso diff --git a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_redfish_storage_controller.yml b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_redfish_storage_controller.yml index 2cb447883..bcf96ddd9 100644 --- a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_redfish_storage_controller.yml +++ b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_redfish_storage_controller.yml @@ -1,216 +1,290 @@ --- -- hosts: idrac - connection: local - name: Dell OpenManage Ansible iDRAC Redfish Storage Controller service. - gather_facts: False - - collections: - - dellemc.openmanage +- name: Dell OpenManage Ansible iDRAC Redfish Storage Controller service. + hosts: idrac + gather_facts: false tasks: - - name: Assign dedicated hot spare. - idrac_redfish_storage_controller: - baseuri: "{{ baseuri }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - volume_id: - - "Disk.Virtual.0:RAID.Slot.1-1" - target: "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1" - tags: - - assign_dedicated_hot_spare - - - name: Assign global hot spare. - idrac_redfish_storage_controller: - baseuri: "{{ baseuri }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - target: "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1" - tags: - - assign_global_hot_spare - - - name: Unassign hot spare - idrac_redfish_storage_controller: - baseuri: "{{ baseuri }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - target: "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1" - command: UnassignSpare - tags: - - un-assign-hot-spare - - - name: Set controller encryption key. - idrac_redfish_storage_controller: - baseuri: "{{ baseuri }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - command: "SetControllerKey" - controller_id: "RAID.Slot.1-1" - key: "PassPhrase@123" - key_id: "mykeyid123" - tags: - - set_controller_key - - - name: Rekey in LKM mode. - idrac_redfish_storage_controller: - baseuri: "{{ baseuri }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - command: "ReKey" - controller_id: "RAID.Slot.1-1" - key: "NewPassPhrase@123" - key_id: "newkeyid123" - old_key: "OldPassPhrase@123" - tags: - - rekey_lkm - - - name: Rekey in SEKM mode. - idrac_redfish_storage_controller: - baseuri: "{{ baseuri }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - command: "ReKey" - controller_id: "RAID.Slot.1-1" - mode: "SEKM" - tags: - - rekey_sekm - - - name: Remove controller key. - idrac_redfish_storage_controller: - baseuri: "{{ baseuri }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - command: "RemoveControllerKey" - controller_id: "RAID.Slot.1-1" - tags: - - remove_controller_key - - - name: Reset controller configuration. - idrac_redfish_storage_controller: - baseuri: "{{ baseuri }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - command: "ResetConfig" - controller_id: "RAID.Slot.1-1" - tags: - - reset_config - - - name: Enable controller encryption - idrac_redfish_storage_controller: - baseuri: "{{ baseuri }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - command: "EnableControllerEncryption" - controller_id: "RAID.Slot.1-1" - mode: "LKM" - key: "your_Key@123" - key_id: "your_Keyid@123" - tags: - - enable-encrypt - - - name: Blink physical disk. - idrac_redfish_storage_controller: - baseuri: "{{ baseuri }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - command: "BlinkTarget" - target: "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1" - tags: - - blink-target - - - name: Blink virtual drive. - idrac_redfish_storage_controller: - baseuri: "{{ baseuri }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - command: "BlinkTarget" - volume_id: "Disk.Virtual.0:RAID.Slot.1-1" - tags: - - blink-volume - - - name: Unblink physical disk. - idrac_redfish_storage_controller: - baseuri: "{{ baseuri }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - command: "UnBlinkTarget" - target: "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1" - tags: - - unblink-target - - - name: Unblink virtual drive. - idrac_redfish_storage_controller: - baseuri: "{{ baseuri }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - command: "UnBlinkTarget" - volume_id: "Disk.Virtual.0:RAID.Slot.1-1" - tags: - - unblink-drive - - - name: Convert physical disk to RAID - idrac_redfish_storage_controller: - baseuri: "{{ baseuri }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - command: "ConvertToRAID" - target: "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1" - tags: - - convert-raid - - - name: Convert physical disk to non-RAID - idrac_redfish_storage_controller: - baseuri: "{{ baseuri }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - command: "ConvertToNonRAID" - target: "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1" - tags: - - convert-non-raid - - - name: Change physical disk state to online. - idrac_redfish_storage_controller: - baseuri: "{{ baseuri }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - command: "ChangePDStateToOnline" - target: "Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1" - tags: - - pd-state-online - - - name: Change physical disk state to offline. - idrac_redfish_storage_controller: - baseuri: "{{ baseuri }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - command: "ChangePDStateToOnline" - target: "Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1" - tags: - - pd-state-offline - - - name: Lock virtual drive - idrac_redfish_storage_controller: - baseuri: "{{ baseuri }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - command: "LockVirtualDisk" - volume_id: "Disk.Virtual.0:RAID.SL.3-1" - tags: - - lock + - name: Assign dedicated hot spare. + dellemc.openmanage.idrac_redfish_storage_controller: + baseuri: "{{ baseuri }}" + username: "{{ username }}" + password: "{{ password }}" + command: "AssignSpare" + ca_path: "/path/to/ca_cert.pem" + volume_id: + - "Disk.Virtual.0:RAID.Slot.1-1" + target: "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1" + tags: + - assign_dedicated_hot_spare + delegate_to: localhost + + - name: Assign global hot spare. + dellemc.openmanage.idrac_redfish_storage_controller: + baseuri: "{{ baseuri }}" + username: "{{ username }}" + password: "{{ password }}" + command: "AssignSpare" + ca_path: "/path/to/ca_cert.pem" + target: "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1" + tags: + - assign_global_hot_spare + delegate_to: localhost + + - name: Unassign hot spare + dellemc.openmanage.idrac_redfish_storage_controller: + baseuri: "{{ baseuri }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + target: "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1" + command: UnassignSpare + tags: + - un-assign-hot-spare + delegate_to: localhost + + - name: Set controller encryption key. + dellemc.openmanage.idrac_redfish_storage_controller: + baseuri: "{{ baseuri }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + command: "SetControllerKey" + controller_id: "RAID.Slot.1-1" + key: "PassPhrase@123" + key_id: "mykeyid123" + tags: + - set_controller_key + delegate_to: localhost + + - name: Rekey in LKM mode. + dellemc.openmanage.idrac_redfish_storage_controller: + baseuri: "{{ baseuri }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + command: "ReKey" + controller_id: "RAID.Slot.1-1" + key: "NewPassPhrase@123" + key_id: "newkeyid123" + old_key: "OldPassPhrase@123" + tags: + - rekey_lkm + delegate_to: localhost + + - name: Rekey in SEKM mode. + dellemc.openmanage.idrac_redfish_storage_controller: + baseuri: "{{ baseuri }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + command: "ReKey" + controller_id: "RAID.Slot.1-1" + mode: "SEKM" + tags: + - rekey_sekm + delegate_to: localhost + + - name: Remove controller key. + dellemc.openmanage.idrac_redfish_storage_controller: + baseuri: "{{ baseuri }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + command: "RemoveControllerKey" + controller_id: "RAID.Slot.1-1" + tags: + - remove_controller_key + delegate_to: localhost + + - name: Reset controller configuration. + dellemc.openmanage.idrac_redfish_storage_controller: + baseuri: "{{ baseuri }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + command: "ResetConfig" + controller_id: "RAID.Slot.1-1" + tags: + - reset_config + delegate_to: localhost + + - name: Enable controller encryption + dellemc.openmanage.idrac_redfish_storage_controller: + baseuri: "{{ baseuri }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + command: "EnableControllerEncryption" + controller_id: "RAID.Slot.1-1" + mode: "LKM" + key: "your_Key@123" + key_id: "your_Keyid@123" + tags: + - enable-encrypt + delegate_to: localhost + + - name: Blink physical disk. + dellemc.openmanage.idrac_redfish_storage_controller: + baseuri: "{{ baseuri }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + command: "BlinkTarget" + target: "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1" + tags: + - blink-target + delegate_to: localhost + + - name: Blink virtual drive. + dellemc.openmanage.idrac_redfish_storage_controller: + baseuri: "{{ baseuri }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + command: "BlinkTarget" + volume_id: "Disk.Virtual.0:RAID.Slot.1-1" + tags: + - blink-volume + delegate_to: localhost + + - name: Unblink physical disk. + dellemc.openmanage.idrac_redfish_storage_controller: + baseuri: "{{ baseuri }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + command: "UnBlinkTarget" + target: "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1" + tags: + - unblink-target + delegate_to: localhost + + - name: Unblink virtual drive. + dellemc.openmanage.idrac_redfish_storage_controller: + baseuri: "{{ baseuri }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + command: "UnBlinkTarget" + volume_id: "Disk.Virtual.0:RAID.Slot.1-1" + tags: + - unblink-drive + delegate_to: localhost + + - name: Convert physical disk to RAID + dellemc.openmanage.idrac_redfish_storage_controller: + baseuri: "{{ baseuri }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + command: "ConvertToRAID" + target: "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1" + tags: + - convert-raid + delegate_to: localhost + + - name: Convert physical disk to non-RAID + dellemc.openmanage.idrac_redfish_storage_controller: + baseuri: "{{ baseuri }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + command: "ConvertToNonRAID" + target: "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1" + tags: + - convert-non-raid + delegate_to: localhost + + - name: Change physical disk state to online. + dellemc.openmanage.idrac_redfish_storage_controller: + baseuri: "{{ baseuri }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + command: "ChangePDStateToOnline" + target: "Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1" + tags: + - pd-state-online + delegate_to: localhost + + - name: Change physical disk state to offline. + dellemc.openmanage.idrac_redfish_storage_controller: + baseuri: "{{ baseuri }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + command: "ChangePDStateToOnline" + target: "Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1" + tags: + - pd-state-offline + delegate_to: localhost + + - name: Lock virtual drive + dellemc.openmanage.idrac_redfish_storage_controller: + baseuri: "{{ baseuri }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + command: "LockVirtualDisk" + volume_id: "Disk.Virtual.0:RAID.SL.3-1" + tags: + - lock + delegate_to: localhost + + - name: Online Capacity Expansion of a volume using target + dellemc.openmanage.idrac_redfish_storage_controller: + baseuri: "{{ baseuri }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + command: "OnlineCapacityExpansion" + volume_id: "Disk.Virtual.0:RAID.Integrated.1-1" + target: + - "Disk.Bay.3:Enclosure.Internal.0-0:RAID.Integrated.1-1" + tags: + - oce_target + delegate_to: localhost + + - name: Online Capacity Expansion of a volume using size + dellemc.openmanage.idrac_redfish_storage_controller: + baseuri: "{{ baseuri }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + command: "OnlineCapacityExpansion" + volume_id: "Disk.Virtual.0:RAID.Integrated.1-1" + size: 363786 + tags: + - oce_size + delegate_to: localhost + + - name: Set controller attributes. + dellemc.openmanage.idrac_redfish_storage_controller: + baseuri: "{{ baseuri }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + controller_id: "RAID.Slot.1-1" + attributes: + ControllerMode: "HBA" + apply_time: "OnReset" + tags: + - controller + delegate_to: localhost + + - name: Configure Controller attributes at Maintenance window + dellemc.openmanage.idrac_redfish_storage_controller: + baseuri: "{{ baseuri }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + controller_id: "RAID.Slot.1-1" + attributes: + CheckConsistencyMode: Normal + CopybackMode: "Off" + LoadBalanceMode: Disabled + apply_time: AtMaintenanceWindowStart + maintenance_window: + start_time: "2022-09-30T05:15:40-05:00" + duration: 1200 + delegate_to: localhost diff --git a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_redfish_storage_controller_job_tracking.yml b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_redfish_storage_controller_job_tracking.yml index d61112f0f..1d8d2489e 100644 --- a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_redfish_storage_controller_job_tracking.yml +++ b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_redfish_storage_controller_job_tracking.yml @@ -1,51 +1,51 @@ --- -- hosts: idrac - connection: local - name: iDRAC Redfish storage controller service with job tracking. - gather_facts: False +- name: Redfish storage controller service with job tracking for iDRAC. + hosts: idrac + gather_facts: false vars: - retries_count: 100 - polling_interval: 10 - all_ctrl_task_tags: - - assign_dedicated_hot_spare - - assign_global_hot_spare - - set_controller_key - - rekey_lkm - - rekey_sekm - - remove_controller_key - - reset_config + retries_count: 100 + polling_interval: 10 + all_ctrl_task_tags: + - assign_dedicated_hot_spare + - assign_global_hot_spare + - set_controller_key + - rekey_lkm + - rekey_sekm + - remove_controller_key + - reset_config - collections: - - dellemc.openmanage - -# Use a single tag to run each task with job tracker + # Use a single tag to run each task with job tracker tasks: - name: Assign dedicated hot spare. - idrac_redfish_storage_controller: + dellemc.openmanage.idrac_redfish_storage_controller: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" + command: "AssignSpare" volume_id: - "Disk.Virtual.0:RAID.Slot.1-1" target: "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1" register: result tags: - assign_dedicated_hot_spare + delegate_to: localhost - name: Assign global hot spare. - idrac_redfish_storage_controller: + dellemc.openmanage.idrac_redfish_storage_controller: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" + command: "AssignSpare" target: "Disk.Bay.0:Enclosure.Internal.0-1:RAID.Slot.1-1" register: result tags: - assign_global_hot_spare + delegate_to: localhost - name: Set controller encryption key. - idrac_redfish_storage_controller: + dellemc.openmanage.idrac_redfish_storage_controller: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" @@ -57,9 +57,10 @@ register: result tags: - set_controller_key + delegate_to: localhost - name: Rekey in LKM mode. - idrac_redfish_storage_controller: + dellemc.openmanage.idrac_redfish_storage_controller: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" @@ -72,9 +73,10 @@ register: result tags: - rekey_lkm + delegate_to: localhost - name: Rekey in SEKM mode. - idrac_redfish_storage_controller: + dellemc.openmanage.idrac_redfish_storage_controller: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" @@ -85,9 +87,10 @@ register: result tags: - rekey_sekm + delegate_to: localhost - name: Remove controller key. - idrac_redfish_storage_controller: + dellemc.openmanage.idrac_redfish_storage_controller: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" @@ -97,9 +100,10 @@ register: result tags: - remove_controller_key + delegate_to: localhost - name: Reset controller configuration. - idrac_redfish_storage_controller: + dellemc.openmanage.idrac_redfish_storage_controller: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" @@ -109,18 +113,19 @@ register: result tags: - reset_config + delegate_to: localhost - - name: "iDRAC Job tracking" - uri: + - name: Job tracking iDRAC + ansible.builtin.uri: url: "https://{{ baseuri }}{{ result.task.uri }}" user: "{{ username }}" password: "{{ password }}" method: "GET" - use_proxy: yes + use_proxy: true status_code: 200, 202 - return_content: yes - validate_certs: no - force_basic_auth: yes + return_content: true + validate_certs: false + force_basic_auth: true headers: Content-Type: "application/json" Accept: "application/json" @@ -129,10 +134,12 @@ retries: "{{ retries_count }}" delay: "{{ polling_interval }}" tags: "{{ all_ctrl_task_tags }}" + delegate_to: localhost - - name: "iDRAC job result." - set_fact: + - name: Job result of iDRAC + ansible.builtin.set_fact: job_details: "{{ result.json }}" failed_when: result.json.Message == "Failed" changed_when: result.json.Message != "Failed" - tags: "{{ all_ctrl_task_tags }}"
\ No newline at end of file + tags: "{{ all_ctrl_task_tags }}" + delegate_to: localhost diff --git a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_reset.yml b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_reset.yml index 209befd22..69e4ac36f 100644 --- a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_reset.yml +++ b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_reset.yml @@ -1,19 +1,15 @@ --- -- hosts: idrac - connection: local - name: Reset iDRAC - gather_facts: False - - collections: - - dellemc.openmanage +- name: Reset iDRAC + hosts: idrac + gather_facts: false tasks: - - name: Reset iDRAC - idrac_reset: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - - tags: - - idrac_reset
\ No newline at end of file + - name: Reset iDRAC + dellemc.openmanage.idrac_reset: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + tags: + - idrac_reset + delegate_to: localhost diff --git a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_reset_result_tracking.yml b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_reset_result_tracking.yml index 534b22274..8c266c184 100644 --- a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_reset_result_tracking.yml +++ b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_reset_result_tracking.yml @@ -1,39 +1,38 @@ --- -- hosts: idrac - connection: local - name: Reset iDRAC - gather_facts: False - - collections: - - dellemc.openmanage +- name: Reset iDRAC + hosts: idrac + gather_facts: false tasks: - name: Reset iDRAC - idrac_reset: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" + dellemc.openmanage.idrac_reset: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" register: result failed_when: result is changed + delegate_to: localhost - name: Wait for port 443 to become open on the host - wait_for: - host: "{{idrac_ip}}" - port: 443 - delay: 30 - connect_timeout: 5 - timeout: 500 + ansible.builtin.wait_for: + host: "{{ idrac_ip }}" + port: 443 + delay: 30 + connect_timeout: 5 + timeout: 500 register: result failed_when: result.elapsed < 20 + delegate_to: localhost - name: Get LC status. - idrac_lifecycle_controller_status_info: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" + dellemc.openmanage.idrac_lifecycle_controller_status_info: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" register: result until: result.msg.LCStatus == 'Ready' or result.msg.LCReady is true retries: 30 delay: 10 + delegate_to: localhost diff --git a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_server_config_profile.yml b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_server_config_profile.yml index 0d61f54c7..80136f456 100644 --- a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_server_config_profile.yml +++ b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_server_config_profile.yml @@ -1,220 +1,309 @@ --- -- hosts: idrac - connection: local - name: Server Configuration Profile - gather_facts: False - - collections: - - dellemc.openmanage +- name: Server Configuration Profile + hosts: idrac + gather_facts: false tasks: + - name: Export SCP with IDRAC components in JSON format to a local path + dellemc.openmanage.idrac_server_config_profile: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + share_name: "/scp_folder" + scp_components: + - IDRAC + scp_file: example_file + export_format: JSON + export_use: Clone + job_wait: true + tags: export-scp-local + delegate_to: localhost + + - name: Import SCP with IDRAC components in JSON format from a local path + dellemc.openmanage.idrac_server_config_profile: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + share_name: "/scp_folder" + command: import + scp_components: + - IDRAC + scp_file: example_file.json + shutdown_type: Graceful + end_host_power_state: "On" + job_wait: false + tags: import-scp-local + delegate_to: localhost + + - name: Export SCP with BIOS components in XML format to a NFS share path with auto-generated file name + dellemc.openmanage.idrac_server_config_profile: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + share_name: "192.168.0.2:/share" + scp_components: + - BIOS + export_format: XML + export_use: Default + job_wait: true + tags: export-scp-nfs + delegate_to: localhost + + - name: Import SCP with BIOS components in XML format from a NFS share path + dellemc.openmanage.idrac_server_config_profile: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + share_name: "192.168.0.2:/share" + command: import + scp_components: + - BIOS + scp_file: 192.168.0.1_20210618_162856.xml + shutdown_type: NoReboot + end_host_power_state: "Off" + job_wait: false + tags: import-scp-nfs + delegate_to: localhost + + - name: Export SCP with RAID components in XML format to a CIFS share path with share user domain name + dellemc.openmanage.idrac_server_config_profile: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + share_name: "\\\\192.168.0.2\\share" + share_user: share_username@domain + share_password: share_password + scp_file: example_file.xml + scp_components: + - RAID + export_format: XML + export_use: Default + job_wait: true + tags: export-scp-cifs + delegate_to: localhost + + - name: Import SCP with RAID components in XML format from a CIFS share path + dellemc.openmanage.idrac_server_config_profile: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + share_name: "\\\\192.168.0.2\\share" + share_user: share_username + share_password: share_password + command: import + scp_components: + - RAID + scp_file: example_file.xml + shutdown_type: Forced + end_host_power_state: "On" + job_wait: true + tags: import-scp-cifs + delegate_to: localhost + + - name: Export SCP with ALL components in JSON format to a HTTP share path + dellemc.openmanage.idrac_server_config_profile: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + share_name: "http://192.168.0.3/share" + share_user: share_username + share_password: share_password + scp_file: example_file.json + scp_components: + - ALL + export_format: JSON + job_wait: false + tags: export-scp-http + delegate_to: localhost + + - name: Import SCP with ALL components in JSON format from a HTTP share path + dellemc.openmanage.idrac_server_config_profile: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + command: import + share_name: "http://192.168.0.3/share" + share_user: share_username + share_password: share_password + scp_file: example_file.json + shutdown_type: Graceful + end_host_power_state: "On" + job_wait: true + tags: import-scp-http + delegate_to: localhost + + - name: Export SCP with ALL components in XML format to a HTTPS share path without SCP file name + dellemc.openmanage.idrac_server_config_profile: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + share_name: "https://192.168.0.4/share" + share_user: share_username + share_password: share_password + scp_components: + - ALL + export_format: XML + export_use: Replace + job_wait: true + tags: export-scp-https + delegate_to: localhost + + - name: Import SCP with ALL components in XML format from a HTTPS share path + dellemc.openmanage.idrac_server_config_profile: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + command: import + share_name: "https://192.168.0.4/share" + share_user: share_username + share_password: share_password + scp_file: 192.168.0.1_20160618_164647.xml + shutdown_type: Graceful + end_host_power_state: "On" + job_wait: false + tags: import-scp-https + delegate_to: localhost + + - name: Preview SCP with ALL components in XML format from a CIFS share path + dellemc.openmanage.idrac_server_config_profile: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + share_name: "\\\\192.168.0.2\\share" + share_user: share_username + share_password: share_password + command: preview + scp_components: + - ALL + scp_file: example_file.xml + job_wait: true + tags: preview-scp-cifs + delegate_to: localhost + + - name: Preview SCP with IDRAC components in JSON format from a NFS share path + dellemc.openmanage.idrac_server_config_profile: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + share_name: "192.168.0.2:/share" + command: preview + scp_components: + - IDRAC + scp_file: example_file.xml + job_wait: true + tags: preview-scp-nfs + delegate_to: localhost + + - name: Preview SCP with ALL components in XML format from a HTTP share path + dellemc.openmanage.idrac_server_config_profile: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + share_name: "http://192.168.0.1/http-share" + share_user: share_username + share_password: share_password + command: preview + scp_components: + - ALL + scp_file: example_file.xml + job_wait: true + tags: preview-scp-http + delegate_to: localhost + + - name: Preview SCP with IDRAC components in XML format from a local path + dellemc.openmanage.idrac_server_config_profile: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + share_name: "/scp_folder" + command: preview + scp_components: + - IDRAC + scp_file: example_file.json + job_wait: false + tags: import-scp-local + delegate_to: localhost + + - name: Import SCP with IDRAC components in XML format from the XML content. + dellemc.openmanage.idrac_server_config_profile: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + command: import + scp_components: + - IDRAC + job_wait: true + import_buffer: "<SystemConfiguration><Component FQDD='iDRAC.Embedded.1'><Attribute Name='IPMILan.1#Enable'> + Disabled</Attribute></Component></SystemConfiguration>" + tags: import-buffer-xml + delegate_to: localhost + + - name: Export SCP with ALL components in XML format using HTTP proxy. + dellemc.openmanage.idrac_server_config_profile: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + scp_components: + - ALL + share_name: "https://192.168.0.1/http-share" + proxy_support: true + proxy_server: 192.168.0.5 + proxy_port: 8080 + proxy_username: proxy_username + proxy_password: proxy_password + proxy_type: http + include_in_export: passwordhashvalues + job_wait: true + tags: export-http-proxy + delegate_to: localhost + + - name: Import SCP with IDRAC and BIOS components in XML format using SOCKS4 proxy + dellemc.openmanage.idrac_server_config_profile: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + command: import + scp_components: + - IDRAC + - BIOS + share_name: "https://192.168.0.1/http-share" + proxy_support: true + proxy_server: 192.168.0.6 + proxy_port: 8080 + proxy_type: socks4 + scp_file: filename.xml + job_wait: true + tags: import-scp-proxy + delegate_to: localhost - - name: Export SCP with IDRAC components in JSON format to a local path - dellemc.openmanage.idrac_server_config_profile: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - share_name: "/scp_folder" - scp_components: IDRAC - scp_file: example_file - export_format: JSON - export_use: Clone - job_wait: True - tags: export-scp-local - - - name: Import SCP with IDRAC components in JSON format from a local path - dellemc.openmanage.idrac_server_config_profile: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - share_name: "/scp_folder" - command: import - scp_components: "IDRAC" - scp_file: example_file.json - shutdown_type: Graceful - end_host_power_state: "On" - job_wait: False - tags: import-scp-local - - - name: Export SCP with BIOS components in XML format to a NFS share path with auto-generated file name - dellemc.openmanage.idrac_server_config_profile: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - share_name: "192.168.0.2:/share" - scp_components: "BIOS" - export_format: XML - export_use: Default - job_wait: True - tags: export-scp-nfs - - - name: Import SCP with BIOS components in XML format from a NFS share path - dellemc.openmanage.idrac_server_config_profile: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - share_name: "192.168.0.2:/share" - command: import - scp_components: "BIOS" - scp_file: 192.168.0.1_20210618_162856.xml - shutdown_type: NoReboot - end_host_power_state: "Off" - job_wait: False - tags: import-scp-nfs - - - name: Export SCP with RAID components in XML format to a CIFS share path with share user domain name - dellemc.openmanage.idrac_server_config_profile: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - share_name: "\\\\192.168.0.2\\share" - share_user: share_username@domain - share_password: share_password - share_mnt: /mnt/cifs - scp_file: example_file.xml - scp_components: "RAID" - export_format: XML - export_use: Default - job_wait: True - tags: export-scp-cifs - - - name: Import SCP with RAID components in XML format from a CIFS share path - dellemc.openmanage.idrac_server_config_profile: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - share_name: "\\\\192.168.0.2\\share" - share_user: share_username - share_password: share_password - share_mnt: /mnt/cifs - command: import - scp_components: "RAID" - scp_file: example_file.xml - shutdown_type: Forced - end_host_power_state: "On" - job_wait: True - tags: import-scp-cifs - - - name: Export SCP with ALL components in JSON format to a HTTP share path - dellemc.openmanage.idrac_server_config_profile: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - share_name: "http://192.168.0.3/share" - share_user: share_username - share_password: share_password - scp_file: example_file.json - scp_components: ALL - export_format: JSON - job_wait: False - tags: export-scp-http - - - name: Import SCP with ALL components in JSON format from a HTTP share path - dellemc.openmanage.idrac_server_config_profile: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - command: import - share_name: "http://192.168.0.3/share" - share_user: share_username - share_password: share_password - scp_file: example_file.json - shutdown_type: Graceful - end_host_power_state: "On" - job_wait: True - tags: import-scp-http - - - name: Export SCP with ALL components in XML format to a HTTPS share path without SCP file name - dellemc.openmanage.idrac_server_config_profile: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - share_name: "https://192.168.0.4/share" - share_user: share_username - share_password: share_password - scp_components: ALL - export_format: XML - export_use: Replace - job_wait: True - tags: export-scp-https - - - name: Import SCP with ALL components in XML format from a HTTPS share path - dellemc.openmanage.idrac_server_config_profile: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - command: import - share_name: "https://192.168.0.4/share" - share_user: share_username - share_password: share_password - scp_file: 192.168.0.1_20160618_164647.xml - shutdown_type: Graceful - end_host_power_state: "On" - job_wait: False - tags: import-scp-https - - - name: Preview SCP with ALL components in XML format from a CIFS share path - dellemc.openmanage.idrac_server_config_profile: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - share_name: "\\\\192.168.0.2\\share" - share_user: share_username - share_password: share_password - command: preview - scp_components: "ALL" - scp_file: example_file.xml - job_wait: True - tags: preview-scp-cifs - - - name: Preview SCP with ALL components in JSON format from a NFS share path - dellemc.openmanage.idrac_server_config_profile: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - share_name: "192.168.0.2:/share" - command: preview - scp_components: "IDRAC" - scp_file: example_file.xml - job_wait: True - tags: preview-scp-nfs - - - name: Preview SCP with ALL components in XML format from a HTTP share path - dellemc.openmanage.idrac_server_config_profile: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - share_name: "http://192.168.0.1/http-share" - share_user: share_username - share_password: share_password - command: preview - scp_components: "ALL" - scp_file: example_file.xml - job_wait: True - tags: preview-scp-http - - - name: Preview SCP with ALL components in XML format from a local path - dellemc.openmanage.idrac_server_config_profile: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - share_name: "/scp_folder" - command: preview - scp_components: "IDRAC" - scp_file: example_file.json - job_wait: False - tags: import-scp-local + - name: Import SCP with IDRAC components in JSON format from the JSON content. + dellemc.openmanage.idrac_server_config_profile: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + command: import + scp_components: + - IDRAC + job_wait: true + import_buffer: "{\"SystemConfiguration\": {\"Components\": [{\"FQDD\": \"iDRAC.Embedded.1\",\"Attributes\": + [{\"Name\": \"SNMP.1#AgentCommunity\",\"Value\": \"public1\"}]}]}}" + tags: import-scp-json + delegate_to: localhost diff --git a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_syslog.yml b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_syslog.yml index 9820b6b69..08e753af3 100644 --- a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_syslog.yml +++ b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_syslog.yml @@ -1,18 +1,15 @@ --- -- hosts: idrac - connection: local - name: Configure iDRAC syslog attributes - gather_facts: False - - collections: - - dellemc.openmanage +- name: Configure iDRAC syslog attributes + hosts: idrac + gather_facts: false tasks: - - name: Configure iDRAC syslog attributes - idrac_syslog: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - share_name: "{{ playbook_dir }}" - syslog: "Disabled"
\ No newline at end of file + - name: Configure iDRAC syslog attributes + dellemc.openmanage.idrac_syslog: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + share_name: "{{ playbook_dir }}" + syslog: "Disabled" + delegate_to: localhost diff --git a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_system_info.yml b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_system_info.yml index b2f1e1ecc..f4eafcf42 100644 --- a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_system_info.yml +++ b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_system_info.yml @@ -1,16 +1,13 @@ --- -- hosts: idrac - connection: local - name: Get system inventory - gather_facts: False - - collections: - - dellemc.openmanage +- name: Get system inventory + hosts: idrac + gather_facts: false tasks: - - name: Get system inventory. - idrac_system_info: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" + - name: Get system inventory. + dellemc.openmanage.idrac_system_info: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + delegate_to: localhost diff --git a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_user.yml b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_user.yml index ab011e13a..847446f0d 100644 --- a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_user.yml +++ b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_user.yml @@ -1,71 +1,71 @@ --- -- hosts: idrac - connection: local - name: Configure the iDRAC users attributes - gather_facts: False - - collections: - - dellemc.openmanage +- name: Configure the iDRAC users attributes + hosts: idrac + gather_facts: false tasks: - - name: Configure the create iDRAC users attributes - idrac_user: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - state: "present" - user_name: "user_name" - user_password: "user_password" - privilege: "Administrator" - ipmi_lan_privilege: "User" - enable: "true" - sol_enable: "true" - protocol_enable: "true" - authentication_protocol: "MD5" - privacy_protocol: "DES" - tags: - - create-user + - name: Configure the create iDRAC users attributes + dellemc.openmanage.idrac_user: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + state: "present" + user_name: "user_name" + user_password: "user_password" + privilege: "Administrator" + ipmi_lan_privilege: "User" + enable: true + sol_enable: true + protocol_enable: true + authentication_protocol: "MD5" + privacy_protocol: "DES" + tags: + - create-user + delegate_to: localhost - - name: Configure the modify iDRAC users attributes - idrac_user: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - action: "present" - user_name: "user_name" - new_user_name: "new_user_name" - privilege: "Administrator" - ipmi_lan_privilege: "User" - enable: "true" - sol_enable: "true" - protocol_enable: "true" - authentication_protocol: "MD5" - privacy_protocol: "DES" - tags: - - modify-user + - name: Configure the modify iDRAC users attributes + dellemc.openmanage.idrac_user: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + state: "present" + user_name: "user_name" + new_user_name: "new_user_name" + privilege: "Administrator" + ipmi_lan_privilege: "User" + enable: true + sol_enable: true + protocol_enable: true + authentication_protocol: "MD5" + privacy_protocol: "DES" + tags: + - modify-user + delegate_to: localhost - - name: Configure the modify iDRAC username and password attributes. - idrac_user: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - action: "present" - user_name: "user_name" - new_user_name: "new_user_name" - user_password: "user_password" - tags: - - modify-username + - name: Configure the modify iDRAC username and password attributes. + dellemc.openmanage.idrac_user: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + state: "present" + user_name: "user_name" + new_user_name: "new_user_name" + user_password: "user_password" + tags: + - modify-username + delegate_to: localhost - - name: Configure the delete iDRAC users attributes - idrac_user: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - state: "absent" - user_name: "user_name" - tags: - - remove-user + - name: Configure the delete iDRAC users attributes + dellemc.openmanage.idrac_user: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + state: "absent" + user_name: "user_name" + tags: + - remove-user + delegate_to: localhost diff --git a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_user_info.yml b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_user_info.yml new file mode 100644 index 000000000..e49cb0bfe --- /dev/null +++ b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_user_info.yml @@ -0,0 +1,31 @@ +--- +- name: Fetching idrac user facts. + hosts: idrac + gather_facts: false + + tasks: + - name: Retrieve basic details of all accounts. + dellemc.openmanage.idrac_user_info: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + delegate_to: localhost + + - name: Retreive user details of a specific user_id + dellemc.openmanage.idrac_user_info: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + user_id: 1 + delegate_to: localhost + + - name: Retreive user details of a specific username + dellemc.openmanage.idrac_user_info: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + username: user_name + delegate_to: localhost diff --git a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_virtual_media.yml b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_virtual_media.yml index 9a2cc5209..7ed4d9ba4 100644 --- a/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_virtual_media.yml +++ b/ansible_collections/dellemc/openmanage/playbooks/idrac/idrac_virtual_media.yml @@ -1,107 +1,109 @@ --- -- hosts: idrac - connection: local - name: Configure the boot order settings - gather_facts: False - - collections: - - dellemc.openmanage +- name: Configure the boot order settings + hosts: idrac + gather_facts: false tasks: + - name: Insert image file to Remote File Share 1 using CIFS share. + dellemc.openmanage.idrac_virtual_media: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + virtual_media: + - insert: true + image: "//192.168.0.2/file_path/file.iso" + username: "username" + password: "password" + tags: insert-media-cifs + delegate_to: localhost - - name: Insert image file to Remote File Share 1 using CIFS share. - idrac_virtual_media: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - virtual_media: - - insert: true - image: "//192.168.0.2/file_path/file.iso" - username: "username" - password: "password" - tags: insert-media-cifs + - name: Insert image file to Remote File Share 2 using NFS share. + dellemc.openmanage.idrac_virtual_media: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + virtual_media: + - index: 2 + insert: true + image: "192.168.0.4:/file_path/file.iso" + tags: insert-media-nfs + delegate_to: localhost - - name: Insert image file to Remote File Share 2 using NFS share. - idrac_virtual_media: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - virtual_media: - - index: 2 - insert: true - image: "192.168.0.4:/file_path/file.iso" - tags: insert-media-nfs + - name: Insert image file to Remote File Share 1 and 2 using HTTP. + dellemc.openmanage.idrac_virtual_media: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + force: true + virtual_media: + - index: 1 + insert: true + image: "http://192.168.0.4/file_path/file.img" + - index: 2 + insert: true + image: "http://192.168.0.4/file_path/file.img" + tags: insert-media-http + delegate_to: localhost - - name: Insert image file to Remote File Share 1 and 2 using HTTP. - idrac_virtual_media: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - force: true - virtual_media: - - index: 1 - insert: true - image: "http://192.168.0.4/file_path/file.img" - - index: 2 - insert: true - image: "http://192.168.0.4/file_path/file.img" - tags: insert-media-http + - name: Insert image file using HTTPS. + dellemc.openmanage.idrac_virtual_media: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + force: true + virtual_media: + - index: 1 + insert: true + image: "https://192.168.0.5/file_path/file.img" + username: username + password: password + tags: insert-media-http + delegate_to: localhost - - name: Insert image file using HTTPS. - idrac_virtual_media: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - force: true - virtual_media: - - index: 1 - insert: true - image: "https://192.168.0.5/file_path/file.img" - username: username - password: password - tags: insert-media-http + - name: Eject multiple virtual media. + dellemc.openmanage.idrac_virtual_media: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + virtual_media: + - index: 1 + insert: false + - index: 2 + insert: false + tags: eject-media + delegate_to: localhost - - name: Eject multiple virtual media. - idrac_virtual_media: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - virtual_media: - - index: 1 - insert: false - - index: 2 + - name: Ejection of image file from Remote File Share 1. + dellemc.openmanage.idrac_virtual_media: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + force: true + virtual_media: insert: false - tags: eject-media + tags: eject-media-rfs1 + delegate_to: localhost - - name: Ejection of image file from Remote File Share 1. - idrac_virtual_media: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - force: true - virtual_media: - insert: false - tags: eject-media-rfs1 - - - name: Insertion and ejection of image file in single task. - idrac_virtual_media: - idrac_ip: "{{ idrac_ip }}" - idrac_user: "{{ idrac_user }}" - idrac_password: "{{ idrac_password }}" - ca_path: "/path/to/ca_cert.pem" - force: true - virtual_media: - - index: 1 - insert: true - image: https://192.168.0.5/file/file.iso - username: username - password: password - - index: 2 - insert: false - tags: insert-eject-media + - name: Insertion and ejection of image file in single task. + dellemc.openmanage.idrac_virtual_media: + idrac_ip: "{{ idrac_ip }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "/path/to/ca_cert.pem" + force: true + virtual_media: + - index: 1 + insert: true + image: https://192.168.0.5/file/file.iso + username: username + password: password + - index: 2 + insert: false + tags: insert-eject-media + delegate_to: localhost |