diff --git a/.github/workflows/ansible-test.yml b/.github/workflows/ansible-test.yml index 3be0908c6..8ea13f4c0 100644 --- a/.github/workflows/ansible-test.yml +++ b/.github/workflows/ansible-test.yml @@ -15,7 +15,7 @@ jobs: strategy: fail-fast: false matrix: - ansible-version: [stable-2.10, stable-2.11, stable-2.12, stable-2.13, stable-2.14] + ansible-version: [stable-2.11, stable-2.12, stable-2.13, stable-2.14] steps: - name: Check out code uses: actions/checkout@v2 @@ -102,7 +102,7 @@ jobs: strategy: fail-fast: false matrix: - ansible-version: [stable-2.11, stable-2.12, stable-2.13, stable-2.14, devel] + ansible-version: [stable-2.11, stable-2.12, stable-2.13, stable-2.14] steps: - name: Set up Python 3.9 @@ -130,3 +130,38 @@ jobs: - name: Run sanity tests run: ansible-test sanity --docker -v --color working-directory: /home/runner/.ansible/collections/ansible_collections/dellemc/openmanage + + lint: + name: Ansible lint + runs-on: ubuntu-latest + needs: [build] + strategy: + fail-fast: false + matrix: + python-version: [3.9, '3.10'] + ansible-version: [stable-2.13, stable-2.14] + + steps: + # Important: This sets up your GITHUB_WORKSPACE environment variable + - name: Checkout the source code + uses: actions/checkout@v3 + with: + fetch-depth: 0 # needed for progressive mode to work + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} + + - name: Install ansible (${{ matrix.ansible-version }}) version + run: pip install https://github.com/ansible/ansible/archive/${{ matrix.ansible-version }}.tar.gz --disable-pip-version-check + + - name: Install ansible lint + run: pip install ansible-lint pytest --disable-pip-version-check + + - name: Install ansible posix + run: ansible-galaxy collection install ansible.posix + + - name: Run Ansible lint + run: ansible-lint --show-relpath + working-directory: /home/runner/work/dellemc-openmanage-ansible-modules/dellemc-openmanage-ansible-modules diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 750b07698..2d0186a2d 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,6 +5,37 @@ Dell OpenManage Ansible Modules Release Notes .. contents:: Topics +v7.3.0 +====== + +Release Summary +--------------- + +Support for iDRAC export Server Configuration Profile role and proxy settings, import buffer, include in export, and ignore certificate warning. + +Major Changes +------------- + +- idrac_server_config_profile - This module is enhanced to support proxy settings, import buffer, include in export, and ignore certificate warning. + +Known Issues +------------ + +- idrac_redfish_storage_contoller - Issue(256164) - If incorrect value is provided for one of the attributes in the provided attribute list for controller configuration, then this module does not exit with error. +- idrac_user - Issue(192043) The module may error out with the message ``unable to perform the import or export operation because there are pending attribute changes or a configuration job is in progress``. Wait for the job to complete and run the task again. +- ome_application_alerts_syslog - Issue(215374) - The module does not provide a proper error message if the destination_address is more than 255 characters. +- ome_device_network_services - Issue(212681) - The module does not provide a proper error message if unsupported values are provided for the parameters- port_number, community_name, max_sessions, max_auth_retries, and idle_timeout. +- ome_device_power_settings - Issue(212679) - The module displays the following message if the value provided for the parameter ``power_cap`` is not within the supported range of 0 to 32767, ``Unable to complete the request because PowerCap does not exist or is not applicable for the resource URI.`` +- ome_inventory - Issue(256257) - All hosts are not retrieved for ``Modular System`` group and corresponding child groups. +- ome_inventory - Issue(256589) - All hosts are not retrieved for ``Custom Groups`` group and corresponding child groups. +- ome_inventory - Issue(256593) - All hosts are not retrieved for ``PLUGIN GROUPS`` group and corresponding child groups. +- ome_smart_fabric_uplink - Issue(186024) - The module does not allow the creation of multiple uplinks of the same name even though it is supported by OpenManage Enterprise Modular. If an uplink is created using the same name as an existing uplink, the existing uplink is modified. + +New Roles +--------- + +- dellemc.openmanage.idrac_export_server_config_profile - Role to export iDRAC Server Configuration Profile (SCP). + v7.2.0 ====== @@ -72,6 +103,14 @@ Known Issues - ome_device_power_settings - Issue(212679) - The module displays the following message if the value provided for the parameter ``power_cap`` is not within the supported range of 0 to 32767, ``Unable to complete the request because PowerCap does not exist or is not applicable for the resource URI.`` - ome_smart_fabric_uplink - Issue(186024) - The module does not allow the creation of multiple uplinks of the same name even though it is supported by OpenManage Enterprise Modular. If an uplink is created using the same name as an existing uplink, the existing uplink is modified. +New Plugins +----------- + +Inventory +~~~~~~~~~ + +- dellemc.openmanage.ome_inventory - Group inventory plugin on OpenManage Enterprise. + New Modules ----------- @@ -418,7 +457,7 @@ Support to provide custom or organizational CA signed certificate for SSL valida Major Changes ------------- -- All modules can read custom or organizational CA signed certificate from the environment variables. Please refer to `SSL Certificate Validation `_ section in the `README.md `_ for modification to existing playbooks or setting environment variable. +- All modules can read custom or organizational CA signed certificate from the environment variables. Please refer to `SSL Certificate Validation ` _ section in the `README.md ` _ for modification to existing playbooks or setting environment variable. Bugfixes -------- diff --git a/README.md b/README.md index a19d0d36f..9f94897b7 100644 --- a/README.md +++ b/README.md @@ -53,4 +53,4 @@ Install the collection from the github repository using the latest commit on the ```ansible-galaxy collection install git+https://github.com/dell/dellemc-openmanage-ansible-modules.git,collections``` ## About -Dell OpenManage Ansible Modules is 100% open source and community-driven. All components are available under [GPL-3.0 license](https://www.gnu.org/licenses/gpl-3.0.html) on GitHub. +Dell OpenManage Ansible Modules is 100% open source and community-driven. All components are available under [GPL-3.0-only](https://www.gnu.org/licenses/gpl-3.0.html) on GitHub. diff --git a/changelogs/.plugin-cache.yaml b/changelogs/.plugin-cache.yaml index 73891787e..e613cf38d 100644 --- a/changelogs/.plugin-cache.yaml +++ b/changelogs/.plugin-cache.yaml @@ -1,4 +1,9 @@ -objects: {} +objects: + role: + idrac_export_server_config_profile: + description: Role to export iDRAC Server Configuration Profile (SCP). + name: idrac_export_server_config_profile + version_added: 7.3.0 plugins: become: {} cache: {} @@ -6,7 +11,11 @@ plugins: cliconf: {} connection: {} httpapi: {} - inventory: {} + inventory: + ome_inventory: + description: Group inventory plugin on OpenManage Enterprise. + name: ome_inventory + version_added: 7.1.0 lookup: {} module: dellemc_configure_idrac_eventing: @@ -45,11 +54,27 @@ plugins: name: dellemc_system_lockdown_mode namespace: '' version_added: 1.0.0 + idrac_attributes: + description: Configure the iDRAC attributes. + name: idrac_attributes + namespace: '' + version_added: 6.0.0 idrac_bios: - description: Configure the BIOS attributes + description: Modify and clear BIOS attributes, reset BIOS settings and configure + boot sources name: idrac_bios namespace: '' version_added: 2.1.0 + idrac_boot: + description: Configure the boot order settings. + name: idrac_boot + namespace: '' + version_added: 6.1.0 + idrac_certificates: + description: Configure certificates for iDRAC + name: idrac_certificates + namespace: '' + version_added: 5.5.0 idrac_firmware: description: Firmware update from a repository on a network share (CIFS, NFS, HTTP, HTTPS, FTP) @@ -92,7 +117,8 @@ plugins: namespace: '' version_added: 2.1.0 idrac_redfish_storage_controller: - description: Configures the storage controller settings + description: Configures the physical disk, virtual disk, and storage controller + settings name: idrac_redfish_storage_controller namespace: '' version_added: 2.1.0 @@ -126,17 +152,42 @@ plugins: name: idrac_user namespace: '' version_added: 2.1.0 + idrac_user_info: + description: Retrieve details of all users or a specific user on iDRAC. + name: idrac_user_info + namespace: '' + version_added: 7.0.0 + idrac_virtual_media: + description: Configure the Remote File Share settings. + name: idrac_virtual_media + namespace: '' + version_added: 6.3.0 ome_active_directory: description: Configure Active Directory groups to be used with Directory Services - on OpenManage Enterprise name: ome_active_directory namespace: '' version_added: 4.0.0 + ome_application_alerts_smtp: + description: This module allows to configure SMTP or email configurations + name: ome_application_alerts_smtp + namespace: '' + version_added: 4.3.0 + ome_application_alerts_syslog: + description: Configure syslog forwarding settings on OpenManage Enterprise and + OpenManage Enterprise Modular + name: ome_application_alerts_syslog + namespace: '' + version_added: 4.3.0 ome_application_certificate: description: This module allows to generate a CSR and upload the certificate name: ome_application_certificate namespace: '' version_added: 2.1.0 + ome_application_console_preferences: + description: Configure console preferences on OpenManage Enterprise. + name: ome_application_console_preferences + namespace: '' + version_added: 5.2.0 ome_application_network_address: description: Updates the network configuration on OpenManage Enterprise name: ome_application_network_address @@ -147,6 +198,12 @@ plugins: name: ome_application_network_proxy namespace: '' version_added: 2.1.0 + ome_application_network_settings: + description: This module allows you to configure the session inactivity timeout + settings + name: ome_application_network_settings + namespace: '' + version_added: 4.4.0 ome_application_network_time: description: Updates the network time on OpenManage Enterprise name: ome_application_network_time @@ -157,6 +214,11 @@ plugins: name: ome_application_network_webserver namespace: '' version_added: 2.1.0 + ome_application_security_settings: + description: Configure the login security properties + name: ome_application_security_settings + namespace: '' + version_added: 4.4.0 ome_chassis_slots: description: Rename sled slots on OpenManage Enterprise Modular name: ome_chassis_slots @@ -174,7 +236,8 @@ plugins: namespace: '' version_added: 3.2.0 ome_device_group: - description: Add devices to a static device group on OpenManage Enterprise + description: Add or remove device(s) from a static device group on OpenManage + Enterprise name: ome_device_group namespace: '' version_added: 3.3.0 @@ -184,6 +247,43 @@ plugins: name: ome_device_info namespace: '' version_added: 2.0.0 + ome_device_local_access_configuration: + description: Configure local access settings on OpenManage Enterprise Modular. + name: ome_device_local_access_configuration + namespace: '' + version_added: 4.4.0 + ome_device_location: + description: Configure device location settings on OpenManage Enterprise Modular + name: ome_device_location + namespace: '' + version_added: 4.2.0 + ome_device_mgmt_network: + description: Configure network settings of devices on OpenManage Enterprise + Modular + name: ome_device_mgmt_network + namespace: '' + version_added: 4.2.0 + ome_device_network_services: + description: Configure chassis network services settings on OpenManage Enterprise + Modular + name: ome_device_network_services + namespace: '' + version_added: 4.3.0 + ome_device_power_settings: + description: Configure chassis power settings on OpenManage Enterprise Modular + name: ome_device_power_settings + namespace: '' + version_added: 4.2.0 + ome_device_quick_deploy: + description: Configure Quick Deploy settings on OpenManage Enterprise Modular. + name: ome_device_quick_deploy + namespace: '' + version_added: 5.0.0 + ome_devices: + description: Perform device-specific operations on target devices + name: ome_devices + namespace: '' + version_added: 6.1.0 ome_diagnostics: description: Export technical support logs(TSR) to network share location name: ome_diagnostics @@ -195,13 +295,13 @@ plugins: namespace: '' version_added: 3.3.0 ome_domain_user_groups: - description: Create, modify, or delete an Active Directory user group on OpenManage - Enterprise and OpenManage Enterprise Modular. + description: Create, modify, or delete an Active Directory/LDAP user group on + OpenManage Enterprise and OpenManage Enterprise Modular name: ome_domain_user_groups namespace: '' version_added: 4.0.0 ome_firmware: - description: Firmware update of PowerEdge devices and its components through + description: Update firmware on PowerEdge devices and its components through OpenManage Enterprise name: ome_firmware namespace: '' @@ -272,17 +372,44 @@ plugins: name: ome_profile namespace: '' version_added: 3.1.0 + ome_profile_info: + description: Retrieve profiles with attribute details + name: ome_profile_info + namespace: '' + version_added: 7.2.0 + ome_server_interface_profile_info: + description: Retrieves the information of server interface profile on OpenManage + Enterprise Modular. + name: ome_server_interface_profile_info + namespace: '' + version_added: 5.1.0 + ome_server_interface_profiles: + description: Configure server interface profiles + name: ome_server_interface_profiles + namespace: '' + version_added: 5.1.0 ome_smart_fabric: description: Create, modify or delete a fabric on OpenManage Enterprise Modular name: ome_smart_fabric namespace: '' version_added: 2.1.0 + ome_smart_fabric_info: + description: Retrieves the information of smart fabrics inventoried by OpenManage + Enterprise Modular + name: ome_smart_fabric_info + namespace: '' + version_added: 7.1.0 ome_smart_fabric_uplink: description: Create, modify or delete a uplink for a fabric on OpenManage Enterprise Modular name: ome_smart_fabric_uplink namespace: '' version_added: 2.1.0 + ome_smart_fabric_uplink_info: + description: Retrieve details of fabric uplink on OpenManage Enterprise Modular. + name: ome_smart_fabric_uplink_info + namespace: '' + version_added: 7.1.0 ome_template: description: Create, modify, deploy, delete, export, import and clone a template on OpenManage Enterprise @@ -306,6 +433,11 @@ plugins: name: ome_template_network_vlan namespace: '' version_added: 2.0.0 + ome_template_network_vlan_info: + description: Retrieves network configuration of template. + name: ome_template_network_vlan_info + namespace: '' + version_added: 7.2.0 ome_user: description: Create, modify or delete a user on OpenManage Enterprise name: ome_user @@ -317,6 +449,11 @@ plugins: name: ome_user_info namespace: '' version_added: 2.0.0 + redfish_event_subscription: + description: Manage Redfish Subscriptions + name: redfish_event_subscription + namespace: '' + version_added: 4.1.0 redfish_firmware: description: To perform a component firmware update using the image file available on the local or remote system @@ -337,4 +474,4 @@ plugins: shell: {} strategy: {} vars: {} -version: 4.0.0 +version: 7.3.0 diff --git a/changelogs/changelog.yaml b/changelogs/changelog.yaml index ab96c7530..4b92060a1 100644 --- a/changelogs/changelog.yaml +++ b/changelogs/changelog.yaml @@ -2,1117 +2,1226 @@ ancestor: null releases: 2.1.0: changes: - release_summary: The `Dell OpenManage Ansible Modules `_ + release_summary: + The `Dell OpenManage Ansible Modules `_ are available on Ansible Galaxy as a collection. - release_date: '2020-07-29' + release_date: "2020-07-29" 2.1.1: changes: deprecated_features: - - The dellemc_configure_bios module is deprecated and replaced with the idrac_bios - module. - - The dellemc_configure_idrac_network module is deprecated and replaced with - the idrac_network module. - - The dellemc_configure_idrac_timezone module is deprecated and replaced with - the idrac_timezone_ntp module. - - The dellemc_delete_lc_job and dellemc_delete_lc_job_queue modules are deprecated - and replaced with the idrac_lifecycle_controller_jobs module. - - The dellemc_export_lc_logs module is deprecated and replaced with the idrac_lifecycle_controller_logs - module. - - The dellemc_get_lc_job_status module is deprecated and replaced with the idrac_lifecycle_controller_job_status_info - module. - - The dellemc_get_lcstatus module is deprecated and replaced with the idrac_lifecycle_controller_status_info - module. - - The dellemc_idrac_reset module is deprecated and replaced with the idrac_reset - module. - - The dellemc_setup_idrac_syslog module is deprecated and replaced with the - idrac_syslog module. + - The dellemc_configure_bios module is deprecated and replaced with the idrac_bios + module. + - The dellemc_configure_idrac_network module is deprecated and replaced with + the idrac_network module. + - The dellemc_configure_idrac_timezone module is deprecated and replaced with + the idrac_timezone_ntp module. + - The dellemc_delete_lc_job and dellemc_delete_lc_job_queue modules are deprecated + and replaced with the idrac_lifecycle_controller_jobs module. + - The dellemc_export_lc_logs module is deprecated and replaced with the idrac_lifecycle_controller_logs + module. + - The dellemc_get_lc_job_status module is deprecated and replaced with the idrac_lifecycle_controller_job_status_info + module. + - The dellemc_get_lcstatus module is deprecated and replaced with the idrac_lifecycle_controller_status_info + module. + - The dellemc_idrac_reset module is deprecated and replaced with the idrac_reset + module. + - The dellemc_setup_idrac_syslog module is deprecated and replaced with the + idrac_syslog module. major_changes: - - Standardization of ten iDRAC ansible modules based on ansible guidelines. - - Support for OpenManage Enterprise Modular. + - Standardization of ten iDRAC ansible modules based on ansible guidelines. + - Support for OpenManage Enterprise Modular. release_summary: Support for OpenManage Enterprise Modular and other enhancements. modules: - - description: Configure the BIOS attributes - name: idrac_bios - namespace: '' - - description: Get the status of a Lifecycle Controller job - name: idrac_lifecycle_controller_job_status_info - namespace: '' - - description: Delete the Lifecycle Controller Jobs - name: idrac_lifecycle_controller_jobs - namespace: '' - - description: Export Lifecycle Controller logs to a network share or local path. - name: idrac_lifecycle_controller_logs - namespace: '' - - description: Get the status of the Lifecycle Controller - name: idrac_lifecycle_controller_status_info - namespace: '' - - description: Configures the iDRAC network attributes - name: idrac_network - namespace: '' - - description: Reset iDRAC - name: idrac_reset - namespace: '' - - description: Enable or disable the syslog on iDRAC - name: idrac_syslog - namespace: '' - - description: Configures time zone and NTP on iDRAC - name: idrac_timezone_ntp - namespace: '' - release_date: '2020-08-26' + - description: Configure the BIOS attributes + name: idrac_bios + namespace: "" + - description: Get the status of a Lifecycle Controller job + name: idrac_lifecycle_controller_job_status_info + namespace: "" + - description: Delete the Lifecycle Controller Jobs + name: idrac_lifecycle_controller_jobs + namespace: "" + - description: Export Lifecycle Controller logs to a network share or local path. + name: idrac_lifecycle_controller_logs + namespace: "" + - description: Get the status of the Lifecycle Controller + name: idrac_lifecycle_controller_status_info + namespace: "" + - description: Configures the iDRAC network attributes + name: idrac_network + namespace: "" + - description: Reset iDRAC + name: idrac_reset + namespace: "" + - description: Enable or disable the syslog on iDRAC + name: idrac_syslog + namespace: "" + - description: Configures time zone and NTP on iDRAC + name: idrac_timezone_ntp + namespace: "" + release_date: "2020-08-26" 2.1.2: changes: bugfixes: - - Documentation improvement request `#140 `_ - - Executing dellemc_configure_idrac_users twice fails the second attempt `#100 - `_ - - dellemc_change_power_state fails if host is already on `#132 `_ - - dellemc_change_power_state not idempotent `#115 `_ - - dellemc_configure_idrac_users error `#26 `_ - - dellemc_configure_idrac_users is unreliable - errors `#113 `_ - - idrac_server_config_profile improvement requested (request) `#137 `_ - - ome_firmware_catalog.yml example errors `#145 `_ + - Documentation improvement request `#140 `_ + - Executing dellemc_configure_idrac_users twice fails the second attempt `#100 + `_ + - dellemc_change_power_state fails if host is already on `#132 `_ + - dellemc_change_power_state not idempotent `#115 `_ + - dellemc_configure_idrac_users error `#26 `_ + - dellemc_configure_idrac_users is unreliable - errors `#113 `_ + - idrac_server_config_profile improvement requested (request) `#137 `_ + - ome_firmware_catalog.yml example errors `#145 `_ deprecated_features: - - The dellemc_change_power_state module is deprecated and replaced with the - redfish_powerstate module. - - The dellemc_configure_idrac_users module is deprecated and replaced with the - idrac_user module. + - The dellemc_change_power_state module is deprecated and replaced with the + redfish_powerstate module. + - The dellemc_configure_idrac_users module is deprecated and replaced with the + idrac_user module. minor_changes: - - The idrac_server_config_profile module supports a user provided file name - for an export operation. - release_summary: The dellemc_change_power_state and dellemc_configure_idrac_users + - The idrac_server_config_profile module supports a user provided file name + for an export operation. + release_summary: + The dellemc_change_power_state and dellemc_configure_idrac_users modules are standardized as per ansible guidelines. 8 GitHub issues are fixed. modules: - - description: Configure settings for user accounts - name: idrac_user - namespace: '' - - description: Manage device power state - name: redfish_powerstate - namespace: '' - release_date: '2020-09-23' + - description: Configure settings for user accounts + name: idrac_user + namespace: "" + - description: Manage device power state + name: redfish_powerstate + namespace: "" + release_date: "2020-09-23" 2.1.3: changes: - release_summary: Network configuration service related modules ome_network_vlan, + release_summary: + Network configuration service related modules ome_network_vlan, ome_network_port_breakout and ome_network_vlan_info are added. modules: - - description: This module allows to automate the port portioning or port breakout - to logical sub ports - name: ome_network_port_breakout - namespace: '' - - description: Create, modify & delete a VLAN - name: ome_network_vlan - namespace: '' - - description: Retrieves the information about networks VLAN(s) present in OpenManage - Enterprise - name: ome_network_vlan_info - namespace: '' - release_date: '2020-10-29' + - description: + This module allows to automate the port portioning or port breakout + to logical sub ports + name: ome_network_port_breakout + namespace: "" + - description: Create, modify & delete a VLAN + name: ome_network_vlan + namespace: "" + - description: + Retrieves the information about networks VLAN(s) present in OpenManage + Enterprise + name: ome_network_vlan_info + namespace: "" + release_date: "2020-10-29" 2.1.4: changes: known_issues: - - 'Issue 1(186024): ome_smart_fabric_uplink module does not allow the creation - of multiple uplinks of the same name even though this is supported by OpenManage - Enterprise Modular. If an uplink is created using the same name as an existing - uplink, the existing uplink is modified.' - release_summary: Fabric management related modules ome_smart_fabric and ome_smart_fabric_uplink + - "Issue 1(186024): ome_smart_fabric_uplink module does not allow the creation + of multiple uplinks of the same name even though this is supported by OpenManage + Enterprise Modular. If an uplink is created using the same name as an existing + uplink, the existing uplink is modified." + release_summary: + Fabric management related modules ome_smart_fabric and ome_smart_fabric_uplink are added. modules: - - description: Create, modify or delete a fabric on OpenManage Enterprise Modular - name: ome_smart_fabric - namespace: '' - - description: Create, modify or delete a uplink for a fabric on OpenManage Enterprise - Modular - name: ome_smart_fabric_uplink - namespace: '' - release_date: '2020-11-25' + - description: Create, modify or delete a fabric on OpenManage Enterprise Modular + name: ome_smart_fabric + namespace: "" + - description: + Create, modify or delete a uplink for a fabric on OpenManage Enterprise + Modular + name: ome_smart_fabric_uplink + namespace: "" + release_date: "2020-11-25" 2.1.5: changes: bugfixes: - - Identity pool does not reset when a network VLAN is added to a template in - the ome_template_network_vlan module. `#169 `_ - - Missing parameter added in ome_smart_fabric_uplink module documenation. `#181 - `_ + - Identity pool does not reset when a network VLAN is added to a template in + the ome_template_network_vlan module. `#169 `_ + - Missing parameter added in ome_smart_fabric_uplink module documenation. `#181 + `_ known_issues: - - 'Issue 1(186024): ome_smart_fabric_uplink module does not allow the creation - of multiple uplinks of the same name even though this is supported by OpenManage - Enterprise Modular. If an uplink is created using the same name as an existing - uplink, the existing uplink is modified.' - - 'Issue 2(187956): If an invalid job_id is provided, idrac_lifecycle_controller_job_status_info - returns an error message. This error message does not contain information - about the exact issue with the invalid job_id.' - - 'Issue 3(188267): While updating the iDRAC firmware, the idrac_firmware module - completes execution before the firmware update job is completed. An incorrect - message is displayed in the task output as ''DRAC WSMAN endpoint returned - HTTP code ''400'' Reason ''Bad Request''''. This issue may occur if the target - iDRAC firmware version is less than 3.30.30.30' + - "Issue 1(186024): ome_smart_fabric_uplink module does not allow the creation + of multiple uplinks of the same name even though this is supported by OpenManage + Enterprise Modular. If an uplink is created using the same name as an existing + uplink, the existing uplink is modified." + - "Issue 2(187956): If an invalid job_id is provided, idrac_lifecycle_controller_job_status_info + returns an error message. This error message does not contain information + about the exact issue with the invalid job_id." + - "Issue 3(188267): While updating the iDRAC firmware, the idrac_firmware module + completes execution before the firmware update job is completed. An incorrect + message is displayed in the task output as 'DRAC WSMAN endpoint returned + HTTP code '400' Reason 'Bad Request''. This issue may occur if the target + iDRAC firmware version is less than 3.30.30.30" minor_changes: - - The idrac_server_config_profile module supports IPv6 address format. - release_summary: The idrac_firmware module is enhanced to include checkmode + - The idrac_server_config_profile module supports IPv6 address format. + release_summary: + The idrac_firmware module is enhanced to include checkmode support and job tracking. - release_date: '2020-12-30' + release_date: "2020-12-30" 3.0.0: changes: bugfixes: - - GitHub issue fix - Module dellemc_idrac_storage_volume.py broken. (https://github.com/dell/dellemc-openmanage-ansible-modules/issues/212) - - GitHub issue fix - ome_smart_fabric Fabric management is not supported on - the specified system. (https://github.com/dell/dellemc-openmanage-ansible-modules/issues/179) - - 'Known issue fix #187956: If an invalid job_id is provided, the idrac_lifecycle_controller_job_status_info - module returns an error message with the description of the issue.' - - 'Known issue fix #188267: No error message is displayed when the target iDRAC - with firmware version less than 3.30.30.30 is updated.' - - Sanity fixes as per ansible guidelines to all modules. + - GitHub issue fix - Module dellemc_idrac_storage_volume.py broken. (https://github.com/dell/dellemc-openmanage-ansible-modules/issues/212) + - GitHub issue fix - ome_smart_fabric Fabric management is not supported on + the specified system. (https://github.com/dell/dellemc-openmanage-ansible-modules/issues/179) + - "Known issue fix #187956: If an invalid job_id is provided, the idrac_lifecycle_controller_job_status_info + module returns an error message with the description of the issue." + - "Known issue fix #188267: No error message is displayed when the target iDRAC + with firmware version less than 3.30.30.30 is updated." + - Sanity fixes as per ansible guidelines to all modules. deprecated_features: - - The ``dellemc_get_firmware_inventory`` module is deprecated and replaced with - ``idrac_firmware_info``. - - The ``dellemc_get_system_inventory`` module is deprecated and replaced with - ``idrac_system_info``. + - The ``dellemc_get_firmware_inventory`` module is deprecated and replaced with + ``idrac_firmware_info``. + - The ``dellemc_get_system_inventory`` module is deprecated and replaced with + ``idrac_system_info``. known_issues: - - 'Issue 1(186024): ome_smart_fabric_uplink module does not allow the creation - of multiple uplinks of the same name even though this is supported by OpenManage - Enterprise Modular. If an uplink is created using the same name as an existing - uplink, the existing uplink is modified.' + - "Issue 1(186024): ome_smart_fabric_uplink module does not allow the creation + of multiple uplinks of the same name even though this is supported by OpenManage + Enterprise Modular. If an uplink is created using the same name as an existing + uplink, the existing uplink is modified." major_changes: - - Removed the existing deprecated modules. + - Removed the existing deprecated modules. minor_changes: - - Coding Guidelines, Contributor Agreement, and Code of Conduct files are added - to the collection. - - New deprecation changes for ``dellemc_get_system_inventory`` and ``dellemc_get_firmware_inventory`` - ignored for ansible 2.9 sanity test. - - The modules are standardized as per ansible guidelines. - release_summary: Deprecations, issue fixes, and standardization of modules as + - Coding Guidelines, Contributor Agreement, and Code of Conduct files are added + to the collection. + - New deprecation changes for ``dellemc_get_system_inventory`` and ``dellemc_get_firmware_inventory`` + ignored for ansible 2.9 sanity test. + - The modules are standardized as per ansible guidelines. + release_summary: + Deprecations, issue fixes, and standardization of modules as per ansible guidelines. - release_date: '2021-01-25' + release_date: "2021-01-25" 3.1.0: changes: bugfixes: - - ome_firmware_baseline_compliance_info - OMEnt firmware baseline compliance - info pagination support added (https://github.com/dell/dellemc-openmanage-ansible-modules/issues/171) - - ome_network_proxy - OMEnt network proxy check mode support added (https://github.com/dell/dellemc-openmanage-ansible-modules/issues/187) + - ome_firmware_baseline_compliance_info - OMEnt firmware baseline compliance + info pagination support added (https://github.com/dell/dellemc-openmanage-ansible-modules/issues/171) + - ome_network_proxy - OMEnt network proxy check mode support added (https://github.com/dell/dellemc-openmanage-ansible-modules/issues/187) known_issues: - - ome_smart_fabric - Issue(185322) Only three design types are supported by - OpenManage Enterprise Modular but the module successfully creates a fabric - when the design type is not supported. - - ome_smart_fabric_uplink - Issue(186024) ome_smart_fabric_uplink module does - not allow the creation of multiple uplinks of the same name even though this - is supported by OpenManage Enterprise Modular. If an uplink is created using - the same name as an existing uplink, the existing uplink is modified. + - ome_smart_fabric - Issue(185322) Only three design types are supported by + OpenManage Enterprise Modular but the module successfully creates a fabric + when the design type is not supported. + - ome_smart_fabric_uplink - Issue(186024) ome_smart_fabric_uplink module does + not allow the creation of multiple uplinks of the same name even though this + is supported by OpenManage Enterprise Modular. If an uplink is created using + the same name as an existing uplink, the existing uplink is modified. release_summary: OpenManage Enterprise profiles management support added. modules: - - description: Create, modify, delete, assign, unassign and migrate a profile - on OpenManage Enterprise - name: ome_profile - namespace: '' - release_date: '2021-02-24' + - description: + Create, modify, delete, assign, unassign and migrate a profile + on OpenManage Enterprise + name: ome_profile + namespace: "" + release_date: "2021-02-24" 3.2.0: changes: known_issues: - - idrac_user - Issue(192043) Module may error out with the message ``unable - to perform the import or export operation because there are pending attribute - changes or a configuration job is in progress``. Wait for the job to complete - and run the task again. - - ome_configuration_compliance_info - Issue(195592) Module may error out with - the message ``unable to process the request because an error occurred``. If - the issue persists, report it to the system administrator. - - ome_smart_fabric - Issue(185322) Only three design types are supported by - OpenManage Enterprise Modular but the module successfully creates a fabric - when the design type is not supported. - - ome_smart_fabric_uplink - Issue(186024) ome_smart_fabric_uplink module does - not allow the creation of multiple uplinks of the same name even though this - is supported by OpenManage Enterprise Modular. If an uplink is created using - the same name as an existing uplink, the existing uplink is modified. + - idrac_user - Issue(192043) Module may error out with the message ``unable + to perform the import or export operation because there are pending attribute + changes or a configuration job is in progress``. Wait for the job to complete + and run the task again. + - ome_configuration_compliance_info - Issue(195592) Module may error out with + the message ``unable to process the request because an error occurred``. If + the issue persists, report it to the system administrator. + - ome_smart_fabric - Issue(185322) Only three design types are supported by + OpenManage Enterprise Modular but the module successfully creates a fabric + when the design type is not supported. + - ome_smart_fabric_uplink - Issue(186024) ome_smart_fabric_uplink module does + not allow the creation of multiple uplinks of the same name even though this + is supported by OpenManage Enterprise Modular. If an uplink is created using + the same name as an existing uplink, the existing uplink is modified. minor_changes: - - ome_template - Allows to deploy a template on device groups. + - ome_template - Allows to deploy a template on device groups. release_summary: Configuration compliance related modules added modules: - - description: Create, modify, and delete a configuration compliance baseline - and remediate non-compliant devices on OpenManage Enterprise - name: ome_configuration_compliance_baseline - namespace: '' - - description: Device compliance report for devices managed in OpenManage Enterprise - name: ome_configuration_compliance_info - namespace: '' - release_date: '2021-03-24' + - description: + Create, modify, and delete a configuration compliance baseline + and remediate non-compliant devices on OpenManage Enterprise + name: ome_configuration_compliance_baseline + namespace: "" + - description: Device compliance report for devices managed in OpenManage Enterprise + name: ome_configuration_compliance_info + namespace: "" + release_date: "2021-03-24" 3.3.0: changes: known_issues: - - idrac_user - Issue(192043) Module may error out with the message ``unable - to perform the import or export operation because there are pending attribute - changes or a configuration job is in progress``. Wait for the job to complete - and run the task again. - - ome_configuration_compliance_info - Issue(195592) Module may error out with - the message ``unable to process the request because an error occurred``. If - the issue persists, report it to the system administrator. - - ome_smart_fabric - Issue(185322) Only three design types are supported by - OpenManage Enterprise Modular but the module successfully creates a fabric - when the design type is not supported. - - ome_smart_fabric_uplink - Issue(186024) ome_smart_fabric_uplink module does - not allow the creation of multiple uplinks of the same name even though this - is supported by OpenManage Enterprise Modular. If an uplink is created using - the same name as an existing uplink, the existing uplink is modified. + - idrac_user - Issue(192043) Module may error out with the message ``unable + to perform the import or export operation because there are pending attribute + changes or a configuration job is in progress``. Wait for the job to complete + and run the task again. + - ome_configuration_compliance_info - Issue(195592) Module may error out with + the message ``unable to process the request because an error occurred``. If + the issue persists, report it to the system administrator. + - ome_smart_fabric - Issue(185322) Only three design types are supported by + OpenManage Enterprise Modular but the module successfully creates a fabric + when the design type is not supported. + - ome_smart_fabric_uplink - Issue(186024) ome_smart_fabric_uplink module does + not allow the creation of multiple uplinks of the same name even though this + is supported by OpenManage Enterprise Modular. If an uplink is created using + the same name as an existing uplink, the existing uplink is modified. minor_changes: - - ome_firmware_baseline - Allows to retrieve the device even if it not in the - first 50 device IDs - release_summary: OpenManage Enterprise device group and device discovery support + - ome_firmware_baseline - Allows to retrieve the device even if it not in the + first 50 device IDs + release_summary: + OpenManage Enterprise device group and device discovery support added modules: - - description: Add devices to a static device group on OpenManage Enterprise - name: ome_device_group - namespace: '' - - description: Create, modify, or delete a discovery job on OpenManage Enterprise - name: ome_discovery - namespace: '' - release_date: '2021-04-28' + - description: Add devices to a static device group on OpenManage Enterprise + name: ome_device_group + namespace: "" + - description: Create, modify, or delete a discovery job on OpenManage Enterprise + name: ome_discovery + namespace: "" + release_date: "2021-04-28" 3.4.0: changes: known_issues: - - idrac_user - Issue(192043) Module may error out with the message ``unable - to perform the import or export operation because there are pending attribute - changes or a configuration job is in progress``. Wait for the job to complete - and run the task again. - - ome_smart_fabric_uplink - Issue(186024) ome_smart_fabric_uplink module does - not allow the creation of multiple uplinks of the same name even though this - is supported by OpenManage Enterprise Modular. If an uplink is created using - the same name as an existing uplink, the existing uplink is modified. + - idrac_user - Issue(192043) Module may error out with the message ``unable + to perform the import or export operation because there are pending attribute + changes or a configuration job is in progress``. Wait for the job to complete + and run the task again. + - ome_smart_fabric_uplink - Issue(186024) ome_smart_fabric_uplink module does + not allow the creation of multiple uplinks of the same name even though this + is supported by OpenManage Enterprise Modular. If an uplink is created using + the same name as an existing uplink, the existing uplink is modified. major_changes: - - ome_firmware_baseline - Module supports check mode, and allows the modification - and deletion of firmware baselines. - - ome_firmware_catalog - Module supports check mode, and allows the modification - and deletion of firmware catalogs. + - ome_firmware_baseline - Module supports check mode, and allows the modification + and deletion of firmware baselines. + - ome_firmware_catalog - Module supports check mode, and allows the modification + and deletion of firmware catalogs. minor_changes: - - ome_firmware_catalog - Added support for repositories available on the Dell - support site. - - ome_template_network_vlan - Added the input option which allows to apply the - modified VLAN settings immediately on the associated modular-system servers. - release_summary: OpenManage Enterprise firmware baseline and firmware catalog + - ome_firmware_catalog - Added support for repositories available on the Dell + support site. + - ome_template_network_vlan - Added the input option which allows to apply the + modified VLAN settings immediately on the associated modular-system servers. + release_summary: + OpenManage Enterprise firmware baseline and firmware catalog modules updated to support checkmode. - release_date: '2021-05-26' + release_date: "2021-05-26" 3.5.0: changes: bugfixes: - - Handled invalid share and unused imports cleanup for iDRAC modules (https://github.com/dell/dellemc-openmanage-ansible-modules/issues/268) + - Handled invalid share and unused imports cleanup for iDRAC modules (https://github.com/dell/dellemc-openmanage-ansible-modules/issues/268) known_issues: - - idrac_user - Issue(192043) Module may error out with the message ``unable - to perform the import or export operation because there are pending attribute - changes or a configuration job is in progress``. Wait for the job to complete - and run the task again. - - ome_smart_fabric_uplink - Issue(186024) ome_smart_fabric_uplink module does - not allow the creation of multiple uplinks of the same name even though this - is supported by OpenManage Enterprise Modular. If an uplink is created using - the same name as an existing uplink, the existing uplink is modified. + - idrac_user - Issue(192043) Module may error out with the message ``unable + to perform the import or export operation because there are pending attribute + changes or a configuration job is in progress``. Wait for the job to complete + and run the task again. + - ome_smart_fabric_uplink - Issue(186024) ome_smart_fabric_uplink module does + not allow the creation of multiple uplinks of the same name even though this + is supported by OpenManage Enterprise Modular. If an uplink is created using + the same name as an existing uplink, the existing uplink is modified. major_changes: - - idrac_server_config_profile - Added support for exporting and importing Server - Configuration Profile through HTTP/HTTPS share. - - ome_device_group - Added support for adding devices to a group using the IP - addresses of the devices and group ID. + - idrac_server_config_profile - Added support for exporting and importing Server + Configuration Profile through HTTP/HTTPS share. + - ome_device_group - Added support for adding devices to a group using the IP + addresses of the devices and group ID. release_summary: Support for managing static device groups on OpenManage Enterprise. modules: - - description: Manages static device groups on OpenManage Enterprise - name: ome_groups - namespace: '' - release_date: '2021-06-28' + - description: Manages static device groups on OpenManage Enterprise + name: ome_groups + namespace: "" + release_date: "2021-06-28" 3.6.0: changes: bugfixes: - - dellemc_idrac_storage_volume - Module fails if the BlockSize, FreeSize, or - Size state of the physical disk is set to "Not Available". + - dellemc_idrac_storage_volume - Module fails if the BlockSize, FreeSize, or + Size state of the physical disk is set to "Not Available". known_issues: - - idrac_user - Issue(192043) Module may error out with the message ``unable - to perform the import or export operation because there are pending attribute - changes or a configuration job is in progress``. Wait for the job to complete - and run the task again. - - ome_smart_fabric_uplink - Issue(186024) ome_smart_fabric_uplink module does - not allow the creation of multiple uplinks of the same name even though this - is supported by OpenManage Enterprise Modular. If an uplink is created using - the same name as an existing uplink, the existing uplink is modified. - release_summary: Support for configuring device slot name and export SupportAssist + - idrac_user - Issue(192043) Module may error out with the message ``unable + to perform the import or export operation because there are pending attribute + changes or a configuration job is in progress``. Wait for the job to complete + and run the task again. + - ome_smart_fabric_uplink - Issue(186024) ome_smart_fabric_uplink module does + not allow the creation of multiple uplinks of the same name even though this + is supported by OpenManage Enterprise Modular. If an uplink is created using + the same name as an existing uplink, the existing uplink is modified. + release_summary: + Support for configuring device slot name and export SupportAssist device collections from OpenManage Enterprise and OpenManage Enterprise Modular. modules: - - description: Rename sled slots on OpenManage Enterprise Modular - name: ome_chassis_slots - namespace: '' - - description: Export technical support logs(TSR) to network share location - name: ome_diagnostics - namespace: '' - release_date: '2021-07-28' + - description: Rename sled slots on OpenManage Enterprise Modular + name: ome_chassis_slots + namespace: "" + - description: Export technical support logs(TSR) to network share location + name: ome_diagnostics + namespace: "" + release_date: "2021-07-28" 4.0.0: changes: known_issues: - - idrac_user - Issue(192043) Module may error out with the message ``unable - to perform the import or export operation because there are pending attribute - changes or a configuration job is in progress``. Wait for the job to complete - and run the task again. - - ome_smart_fabric_uplink - Issue(186024) ome_smart_fabric_uplink module does - not allow the creation of multiple uplinks of the same name even though this - is supported by OpenManage Enterprise Modular. If an uplink is created using - the same name as an existing uplink, the existing uplink is modified. - release_summary: Support for configuring active directory user group on OpenManage Enterprise and OpenManage Enterprise Modular. + - idrac_user - Issue(192043) Module may error out with the message ``unable + to perform the import or export operation because there are pending attribute + changes or a configuration job is in progress``. Wait for the job to complete + and run the task again. + - ome_smart_fabric_uplink - Issue(186024) ome_smart_fabric_uplink module does + not allow the creation of multiple uplinks of the same name even though this + is supported by OpenManage Enterprise Modular. If an uplink is created using + the same name as an existing uplink, the existing uplink is modified. + release_summary: + Support for configuring active directory user group on OpenManage + Enterprise and OpenManage Enterprise Modular. modules: - - description: Configure Active Directory groups to be used with Directory Services - on OpenManage Enterprise and OpenManage Enterprise Modular - name: ome_active_directory - namespace: '' - - description: Create, modify, or delete an Active Directory user group on OpenManage - Enterprise and OpenManage Enterprise Modular - name: ome_domain_user_groups - namespace: '' - release_date: '2021-08-27' + - description: + Configure Active Directory groups to be used with Directory Services + on OpenManage Enterprise and OpenManage Enterprise Modular + name: ome_active_directory + namespace: "" + - description: + Create, modify, or delete an Active Directory user group on OpenManage + Enterprise and OpenManage Enterprise Modular + name: ome_domain_user_groups + namespace: "" + release_date: "2021-08-27" 4.1.0: changes: + known_issues: + - idrac_user - Issue(192043) Module may error out with the message ``unable + to perform the import or export operation because there are pending attribute + changes or a configuration job is in progress``. Wait for the job to complete + and run the task again. + - ome_smart_fabric_uplink - Issue(186024) ome_smart_fabric_uplink module does + not allow the creation of multiple uplinks of the same name even though it + is supported by OpenManage Enterprise Modular. If an uplink is created using + the same name as an existing uplink, the existing uplink is modified. major_changes: - - ome_firmware - Added option to stage the firmware update and support for selecting components and devices for baseline-based firmware update. + - ome_firmware - Added option to stage the firmware update and support for selecting + components and devices for baseline-based firmware update. minor_changes: - - ome_template_network_vlan - Enabled check_mode support. - known_issues: - - idrac_user - Issue(192043) Module may error out with the message ``unable - to perform the import or export operation because there are pending attribute - changes or a configuration job is in progress``. Wait for the job to complete - and run the task again. - - ome_smart_fabric_uplink - Issue(186024) ome_smart_fabric_uplink module does - not allow the creation of multiple uplinks of the same name even though it - is supported by OpenManage Enterprise Modular. If an uplink is created using - the same name as an existing uplink, the existing uplink is modified. - release_summary: Support for Redfish event subscriptions and enhancements to ome_firmware module. + - ome_template_network_vlan - Enabled check_mode support. + release_summary: + Support for Redfish event subscriptions and enhancements to + ome_firmware module. modules: - - description: Manage Redfish Subscriptions - name: redfish_event_subscription - namespace: '' - release_date: '2021-09-28' + - description: Manage Redfish Subscriptions + name: redfish_event_subscription + namespace: "" + release_date: "2021-09-28" 4.2.0: changes: known_issues: - - idrac_user - Issue(192043) Module may error out with the message ``unable - to perform the import or export operation because there are pending attribute - changes or a configuration job is in progress``. Wait for the job to complete - and run the task again. - - ome_smart_fabric_uplink - Issue(186024) ome_smart_fabric_uplink module does - not allow the creation of multiple uplinks of the same name even though it - is supported by OpenManage Enterprise Modular. If an uplink is created using - the same name as an existing uplink, the existing uplink is modified. - - ome_device_power_settings - Issue(212679) The ome_device_power_settings module - errors out with the following message if the value provided for the - parameter ``power_cap`` is not within the supported range of 0 to 32767, ``Unable to - complete the request because PowerCap does not exist or is not applicable - for the resource URI.`` - release_summary: Support to configure OME Modular devices network, power, and location settings. + - idrac_user - Issue(192043) Module may error out with the message ``unable + to perform the import or export operation because there are pending attribute + changes or a configuration job is in progress``. Wait for the job to complete + and run the task again. + - ome_device_power_settings - Issue(212679) The ome_device_power_settings module + errors out with the following message if the value provided for the parameter + ``power_cap`` is not within the supported range of 0 to 32767, ``Unable to + complete the request because PowerCap does not exist or is not applicable + for the resource URI.`` + - ome_smart_fabric_uplink - Issue(186024) ome_smart_fabric_uplink module does + not allow the creation of multiple uplinks of the same name even though it + is supported by OpenManage Enterprise Modular. If an uplink is created using + the same name as an existing uplink, the existing uplink is modified. + release_summary: + Support to configure OME Modular devices network, power, and + location settings. modules: - - description: Configure network settings of devices on OpenManage Enterprise Modular - name: ome_device_mgmt_network - namespace: '' - - description: Configure device location settings on OpenManage Enterprise Modular - name: ome_device_location - namespace: '' - - description: Configure chassis power settings on OpenManage Enterprise Modular - name: ome_device_power_settings - namespace: '' - release_date: '2021-10-27' + - description: Configure device location settings on OpenManage Enterprise Modular + name: ome_device_location + namespace: "" + - description: + Configure network settings of devices on OpenManage Enterprise + Modular + name: ome_device_mgmt_network + namespace: "" + - description: Configure chassis power settings on OpenManage Enterprise Modular + name: ome_device_power_settings + namespace: "" + release_date: "2021-10-27" 4.3.0: changes: known_issues: - - ome_device_network_services - Issue(212681) - The module does not provide a - proper error message if unsupported values are provided for the parameters- - port_number, community_name, max_sessions, max_auth_retries, and idle_timeout. - - ome_application_alerts_syslog - Issue(215374) - The module does not provide a - proper error message if the destination_address is more than 255 characters. - - ome_application_alerts_smtp - Issue(212310) - The module does not provide a - proper error message if the destination_address is more than 255 characters. - - idrac_user - Issue(192043) The module may error out with the message ``unable - to perform the import or export operation because there are pending attribute - changes or a configuration job is in progress``. Wait for the job to complete - and run the task again. - - ome_smart_fabric_uplink - Issue(186024) - The module does not allow the creation - of multiple uplinks of the same name even though it is supported by OpenManage - Enterprise Modular. If an uplink is created using the same name as an existing - uplink, the existing uplink is modified. - - ome_device_power_settings - Issue(212679) - The module errors out with the - following message if the value provided for the parameter ``power_cap`` is - not within the supported range of 0 to 32767, ``Unable to complete the request - because PowerCap does not exist or is not applicable for the resource URI.`` - release_summary: Support to configure network services, syslog forwarding, and SMTP settings. + - idrac_user - Issue(192043) The module may error out with the message ``unable + to perform the import or export operation because there are pending attribute + changes or a configuration job is in progress``. Wait for the job to complete + and run the task again. + - ome_application_alerts_smtp - Issue(212310) - The module does not provide + a proper error message if the destination_address is more than 255 characters. + - ome_application_alerts_syslog - Issue(215374) - The module does not provide + a proper error message if the destination_address is more than 255 characters. + - ome_device_network_services - Issue(212681) - The module does not provide + a proper error message if unsupported values are provided for the parameters- + port_number, community_name, max_sessions, max_auth_retries, and idle_timeout. + - ome_device_power_settings - Issue(212679) - The module errors out with the + following message if the value provided for the parameter ``power_cap`` is + not within the supported range of 0 to 32767, ``Unable to complete the request + because PowerCap does not exist or is not applicable for the resource URI.`` + - ome_smart_fabric_uplink - Issue(186024) - The module does not allow the creation + of multiple uplinks of the same name even though it is supported by OpenManage + Enterprise Modular. If an uplink is created using the same name as an existing + uplink, the existing uplink is modified. + release_summary: + Support to configure network services, syslog forwarding, and + SMTP settings. modules: - - description: Configure chassis network services settings on OpenManage Enterprise Modular - name: ome_device_network_services - namespace: '' - - description: This module allows to configure SMTP or email configurations - name: ome_application_alerts_smtp - namespace: '' - - description: Configure syslog forwarding settings on OpenManage Enterprise and OpenManage Enterprise Modular - name: ome_application_alerts_syslog - namespace: '' - release_date: '2021-11-26' + - description: This module allows to configure SMTP or email configurations + name: ome_application_alerts_smtp + namespace: "" + - description: + Configure syslog forwarding settings on OpenManage Enterprise and + OpenManage Enterprise Modular + name: ome_application_alerts_syslog + namespace: "" + - description: + Configure chassis network services settings on OpenManage Enterprise + Modular + name: ome_device_network_services + namespace: "" + release_date: "2021-11-26" 4.4.0: changes: bugfixes: - - ome_device_location - The issue that applies values of the location settings only in lowercase is fixed (https://github.com/dell/dellemc-openmanage-ansible-modules/issues/341) - minor_changes: - - ome_firmware - The module is enhanced to support check mode and idempotency (https://github.com/dell/dellemc-openmanage-ansible-modules/issues/274) - - ome_template - An example task is added to create a compliance template from reference device (https://github.com/dell/dellemc-openmanage-ansible-modules/issues/339) + - ome_device_location - The issue that applies values of the location settings + only in lowercase is fixed (https://github.com/dell/dellemc-openmanage-ansible-modules/issues/341) known_issues: - - ome_device_local_access_configuration - Issue(217865) - The module does not - display a proper error message if an unsupported value is provided for the - user_defined and lcd_language parameters. - - ome_device_local_access_configuration - Issue(215035) - The module reports - ``Successfully updated the local access setting`` if an unsupported value is - provided for the parameter timeout_limit. However, this value is not - actually applied on OpenManage Enterprise Modular. - - ome_device_network_services - Issue(212681) - The module does not provide a - proper error message if unsupported values are provided for the parameters- - port_number, community_name, max_sessions, max_auth_retries, and idle_timeout. - - ome_application_alerts_syslog - Issue(215374) - The module does not provide a - proper error message if the destination_address is more than 255 characters. - - ome_application_alerts_smtp - Issue(212310) - The module does not provide a - proper error message if the destination_address is more than 255 characters. - - idrac_user - Issue(192043) The module may error out with the message ``unable - to perform the import or export operation because there are pending attribute - changes or a configuration job is in progress``. Wait for the job to complete - and run the task again. - - ome_smart_fabric_uplink - Issue(186024) - The module does not allow the creation - of multiple uplinks of the same name even though it is supported by OpenManage - Enterprise Modular. If an uplink is created using the same name as an existing - uplink, the existing uplink is modified. - - ome_device_power_settings - Issue(212679) - The module errors out with the - following message if the value provided for the parameter ``power_cap`` is - not within the supported range of 0 to 32767, ``Unable to complete the request - because PowerCap does not exist or is not applicable for the resource URI.`` - release_summary: Support to configure login security, session inactivity timeout, and local access settings. + - idrac_user - Issue(192043) The module may error out with the message ``unable + to perform the import or export operation because there are pending attribute + changes or a configuration job is in progress``. Wait for the job to complete + and run the task again. + - ome_application_alerts_smtp - Issue(212310) - The module does not provide + a proper error message if the destination_address is more than 255 characters. + - ome_application_alerts_syslog - Issue(215374) - The module does not provide + a proper error message if the destination_address is more than 255 characters. + - ome_device_local_access_configuration - Issue(215035) - The module reports + ``Successfully updated the local access setting`` if an unsupported value + is provided for the parameter timeout_limit. However, this value is not actually + applied on OpenManage Enterprise Modular. + - ome_device_local_access_configuration - Issue(217865) - The module does not + display a proper error message if an unsupported value is provided for the + user_defined and lcd_language parameters. + - ome_device_network_services - Issue(212681) - The module does not provide + a proper error message if unsupported values are provided for the parameters- + port_number, community_name, max_sessions, max_auth_retries, and idle_timeout. + - ome_device_power_settings - Issue(212679) - The module errors out with the + following message if the value provided for the parameter ``power_cap`` is + not within the supported range of 0 to 32767, ``Unable to complete the request + because PowerCap does not exist or is not applicable for the resource URI.`` + - ome_smart_fabric_uplink - Issue(186024) - The module does not allow the creation + of multiple uplinks of the same name even though it is supported by OpenManage + Enterprise Modular. If an uplink is created using the same name as an existing + uplink, the existing uplink is modified. + minor_changes: + - ome_firmware - The module is enhanced to support check mode and idempotency + (https://github.com/dell/dellemc-openmanage-ansible-modules/issues/274) + - ome_template - An example task is added to create a compliance template from + reference device (https://github.com/dell/dellemc-openmanage-ansible-modules/issues/339) + release_summary: + Support to configure login security, session inactivity timeout, + and local access settings. modules: - - description: Configure the login security properties - name: ome_application_security_settings - namespace: '' - - description: This module allows you to configure the session inactivity timeout settings - name: ome_application_network_settings - namespace: '' - - description: Configure local access settings on OpenManage Enterprise Modular - name: ome_device_local_access_configuration - namespace: '' - release_date: '2021-12-24' + - description: + This module allows you to configure the session inactivity timeout + settings + name: ome_application_network_settings + namespace: "" + - description: Configure the login security properties + name: ome_application_security_settings + namespace: "" + - description: Configure local access settings on OpenManage Enterprise Modular + name: ome_device_local_access_configuration + namespace: "" + release_date: "2021-12-24" 5.0.0: changes: - major_changes: - - All modules now support SSL over HTTPS and socket level timeout. breaking_changes: - - HTTPS SSL certificate validation is a **breaking change** and will require modification in the - existing playbooks. Please refer to `SSL Certificate Validation `_ section in the `README.md `_ for modification to existing playbooks. + - HTTPS SSL certificate validation is a **breaking change** and will require + modification in the existing playbooks. Please refer to `SSL Certificate Validation + `_ + section in the `README.md `_ + for modification to existing playbooks. bugfixes: - - idrac_bios - The issue while configuring boot sources is fixed (https://github.com/dell/dellemc-openmanage-ansible-modules/issues/347) + - idrac_bios - The issue while configuring boot sources is fixed (https://github.com/dell/dellemc-openmanage-ansible-modules/issues/347) known_issues: - - ome_device_quick_deploy - Issue(216352) - The module does not display a proper error message - if an unsupported value is provided for the ipv6_prefix_length and vlan_id parameters. - - ome_device_local_access_configuration - Issue(217865) - The module does not - display a proper error message if an unsupported value is provided for the - user_defined and lcd_language parameters. - - ome_device_local_access_configuration - Issue(215035) - The module reports - ``Successfully updated the local access setting`` if an unsupported value is - provided for the parameter timeout_limit. However, this value is not - actually applied on OpenManage Enterprise Modular. - - ome_device_network_services - Issue(212681) - The module does not provide a - proper error message if unsupported values are provided for the parameters- - port_number, community_name, max_sessions, max_auth_retries, and idle_timeout. - - ome_application_alerts_syslog - Issue(215374) - The module does not provide a - proper error message if the destination_address is more than 255 characters. - - ome_application_alerts_smtp - Issue(212310) - The module does not provide a - proper error message if the destination_address is more than 255 characters. - - idrac_user - Issue(192043) The module may error out with the message ``unable - to perform the import or export operation because there are pending attribute - changes or a configuration job is in progress``. Wait for the job to complete - and run the task again. - - ome_smart_fabric_uplink - Issue(186024) - The module does not allow the creation - of multiple uplinks of the same name even though it is supported by OpenManage - Enterprise Modular. If an uplink is created using the same name as an existing - uplink, the existing uplink is modified. - - ome_device_power_settings - Issue(212679) - The module errors out with the - following message if the value provided for the parameter ``power_cap`` is - not within the supported range of 0 to 32767, ``Unable to complete the request - because PowerCap does not exist or is not applicable for the resource URI.`` + - idrac_user - Issue(192043) The module may error out with the message ``unable + to perform the import or export operation because there are pending attribute + changes or a configuration job is in progress``. Wait for the job to complete + and run the task again. + - ome_application_alerts_smtp - Issue(212310) - The module does not provide + a proper error message if the destination_address is more than 255 characters. + - ome_application_alerts_syslog - Issue(215374) - The module does not provide + a proper error message if the destination_address is more than 255 characters. + - ome_device_local_access_configuration - Issue(215035) - The module reports + ``Successfully updated the local access setting`` if an unsupported value + is provided for the parameter timeout_limit. However, this value is not actually + applied on OpenManage Enterprise Modular. + - ome_device_local_access_configuration - Issue(217865) - The module does not + display a proper error message if an unsupported value is provided for the + user_defined and lcd_language parameters. + - ome_device_network_services - Issue(212681) - The module does not provide + a proper error message if unsupported values are provided for the parameters- + port_number, community_name, max_sessions, max_auth_retries, and idle_timeout. + - ome_device_power_settings - Issue(212679) - The module errors out with the + following message if the value provided for the parameter ``power_cap`` is + not within the supported range of 0 to 32767, ``Unable to complete the request + because PowerCap does not exist or is not applicable for the resource URI.`` + - ome_device_quick_deploy - Issue(216352) - The module does not display a proper + error message if an unsupported value is provided for the ipv6_prefix_length + and vlan_id parameters. + - ome_smart_fabric_uplink - Issue(186024) - The module does not allow the creation + of multiple uplinks of the same name even though it is supported by OpenManage + Enterprise Modular. If an uplink is created using the same name as an existing + uplink, the existing uplink is modified. + major_changes: + - All modules now support SSL over HTTPS and socket level timeout. release_summary: HTTPS SSL support for all modules and quick deploy settings. modules: - - description: Configure Quick Deploy settings on OpenManage Enterprise Modular - name: ome_device_quick_deploy - namespace: '' - release_date: '2022-01-27' + - description: Configure Quick Deploy settings on OpenManage Enterprise Modular + name: ome_device_quick_deploy + namespace: "" + release_date: "2022-01-27" 5.0.1: changes: - major_changes: - - All modules can read custom or organizational CA signed certificate from the environment variables. - Please refer to `SSL Certificate Validation `_ section in the `README.md `_ for modification to existing playbooks or setting environment variable. bugfixes: - - The ome_application_network_time and ome_application_network_proxy modules are breaking due - to the changes introduced for SSL validation.(https://github.com/dell/dellemc-openmanage-ansible-modules/issues/360) - - All playbooks require modification because the validate_certs argument is set to True by default - (https://github.com/dell/dellemc-openmanage-ansible-modules/issues/357) + - All playbooks require modification because the validate_certs argument is + set to True by default (https://github.com/dell/dellemc-openmanage-ansible-modules/issues/357) + - The ome_application_network_time and ome_application_network_proxy modules + are breaking due to the changes introduced for SSL validation.(https://github.com/dell/dellemc-openmanage-ansible-modules/issues/360) known_issues: - - ome_device_quick_deploy - Issue(216352) - The module does not display a proper error message - if an unsupported value is provided for the ipv6_prefix_length and vlan_id parameters. - - ome_device_local_access_configuration - Issue(217865) - The module does not - display a proper error message if an unsupported value is provided for the - user_defined and lcd_language parameters. - - ome_device_local_access_configuration - Issue(215035) - The module reports - ``Successfully updated the local access setting`` if an unsupported value is - provided for the parameter timeout_limit. However, this value is not - actually applied on OpenManage Enterprise Modular. - - ome_device_network_services - Issue(212681) - The module does not provide a - proper error message if unsupported values are provided for the parameters- - port_number, community_name, max_sessions, max_auth_retries, and idle_timeout. - - ome_application_alerts_syslog - Issue(215374) - The module does not provide a - proper error message if the destination_address is more than 255 characters. - - ome_application_alerts_smtp - Issue(212310) - The module does not provide a - proper error message if the destination_address is more than 255 characters. - idrac_user - Issue(192043) The module may error out with the message ``unable to perform the import or export operation because there are pending attribute changes or a configuration job is in progress``. Wait for the job to complete and run the task again. - - ome_smart_fabric_uplink - Issue(186024) - The module does not allow the creation - of multiple uplinks of the same name even though it is supported by OpenManage - Enterprise Modular. If an uplink is created using the same name as an existing - uplink, the existing uplink is modified. + - ome_application_alerts_smtp - Issue(212310) - The module does not provide + a proper error message if the destination_address is more than 255 characters. + - ome_application_alerts_syslog - Issue(215374) - The module does not provide + a proper error message if the destination_address is more than 255 characters. + - ome_device_local_access_configuration - Issue(215035) - The module reports + ``Successfully updated the local access setting`` if an unsupported value + is provided for the parameter timeout_limit. However, this value is not actually + applied on OpenManage Enterprise Modular. + - ome_device_local_access_configuration - Issue(217865) - The module does not + display a proper error message if an unsupported value is provided for the + user_defined and lcd_language parameters. + - ome_device_network_services - Issue(212681) - The module does not provide + a proper error message if unsupported values are provided for the parameters- + port_number, community_name, max_sessions, max_auth_retries, and idle_timeout. - ome_device_power_settings - Issue(212679) - The module errors out with the following message if the value provided for the parameter ``power_cap`` is not within the supported range of 0 to 32767, ``Unable to complete the request because PowerCap does not exist or is not applicable for the resource URI.`` - release_summary: Support to provide custom or organizational CA signed certificate for SSL validation from the environment variable. - release_date: '2022-02-11' + - ome_device_quick_deploy - Issue(216352) - The module does not display a proper + error message if an unsupported value is provided for the ipv6_prefix_length + and vlan_id parameters. + - ome_smart_fabric_uplink - Issue(186024) - The module does not allow the creation + of multiple uplinks of the same name even though it is supported by OpenManage + Enterprise Modular. If an uplink is created using the same name as an existing + uplink, the existing uplink is modified. + major_changes: + - All modules can read custom or organizational CA signed certificate from the environment variables. + Please refer to `SSL Certificate Validation + ` + _ section in the `README.md ` + _ for modification to existing playbooks or setting environment variable. + release_summary: + Support to provide custom or organizational CA signed certificate + for SSL validation from the environment variable. + release_date: "2022-02-11" 5.1.0: changes: bugfixes: - - idrac_firmware - Issue (220130) The socket.timout issue that occurs - during the wait_for_job_completion() job is fixed. - minor_changes: - - ome_identity_pool - The module is enhanced to support check mode and - idempotency. - (https://github.com/dell/dellemc-openmanage-ansible-modules/issues/328) - - ome_template_identity_pool - The module is enhanced to support check - mode and idempotency. - - ome_application_network_address - The module is enhanced to support - check mode and idempotency. - - redfish_event_subscription - The module is enhanced to support check - mode and idempotency. - - ome_identity_pool - The iSCSI Initiator and Initiator IP Pool - attributes are not mandatory to create an identity pool. - (https://github.com/dell/dellemc-openmanage-ansible-modules/issues/329) - - ome_device_info - The module is enhanced to return a blank list when - devices or baselines are not present in the system. - - ome_firmware_baseline_compliance_info - The module is enhanced to - return a blank list when devices or baselines are not present in the system. - - ome_firmware_baseline_info - The module is enhanced to return a blank - list when devices or baselines are not present in the system. + - idrac_firmware - Issue (220130) The socket.timout issue that occurs during + the wait_for_job_completion() job is fixed. known_issues: - - ome_device_local_access_configuration - Issue(217865) - The module does not - display a proper error message if an unsupported value is provided for the - user_defined and lcd_language parameters. - - ome_device_local_access_configuration - Issue(215035) - The module reports - ``Successfully updated the local access setting`` if an unsupported value is - provided for the parameter timeout_limit. However, this value is not - actually applied on OpenManage Enterprise Modular. - - ome_device_network_services - Issue(212681) - The module does not provide a - proper error message if unsupported values are provided for the parameters- - port_number, community_name, max_sessions, max_auth_retries, and idle_timeout. - - ome_application_alerts_syslog - Issue(215374) - The module does not provide a - proper error message if the destination_address is more than 255 characters. - - ome_application_alerts_smtp - Issue(212310) - The module does not provide a - proper error message if the destination_address is more than 255 characters. - idrac_user - Issue(192043) The module may error out with the message ``unable to perform the import or export operation because there are pending attribute changes or a configuration job is in progress``. Wait for the job to complete and run the task again. - - ome_smart_fabric_uplink - Issue(186024) - The module does not allow the creation - of multiple uplinks of the same name even though it is supported by OpenManage - Enterprise Modular. If an uplink is created using the same name as an existing - uplink, the existing uplink is modified. + - ome_application_alerts_smtp - Issue(212310) - The module does not provide + a proper error message if the destination_address is more than 255 characters. + - ome_application_alerts_syslog - Issue(215374) - The module does not provide + a proper error message if the destination_address is more than 255 characters. + - ome_device_local_access_configuration - Issue(215035) - The module reports + ``Successfully updated the local access setting`` if an unsupported value + is provided for the parameter timeout_limit. However, this value is not actually + applied on OpenManage Enterprise Modular. + - ome_device_local_access_configuration - Issue(217865) - The module does not + display a proper error message if an unsupported value is provided for the + user_defined and lcd_language parameters. + - ome_device_network_services - Issue(212681) - The module does not provide + a proper error message if unsupported values are provided for the parameters- + port_number, community_name, max_sessions, max_auth_retries, and idle_timeout. - ome_device_power_settings - Issue(212679) - The module errors out with the following message if the value provided for the parameter ``power_cap`` is not within the supported range of 0 to 32767, ``Unable to complete the request because PowerCap does not exist or is not applicable for the resource URI.`` - release_summary: Support for OpenManage Enterprise Modular server interface management. + - ome_smart_fabric_uplink - Issue(186024) - The module does not allow the creation + of multiple uplinks of the same name even though it is supported by OpenManage + Enterprise Modular. If an uplink is created using the same name as an existing + uplink, the existing uplink is modified. + minor_changes: + - ome_application_network_address - The module is enhanced to support check + mode and idempotency. + - ome_device_info - The module is enhanced to return a blank list when devices + or baselines are not present in the system. + - ome_firmware_baseline_compliance_info - The module is enhanced to return a + blank list when devices or baselines are not present in the system. + - ome_firmware_baseline_info - The module is enhanced to return a blank list + when devices or baselines are not present in the system. + - ome_identity_pool - The iSCSI Initiator and Initiator IP Pool attributes are + not mandatory to create an identity pool. (https://github.com/dell/dellemc-openmanage-ansible-modules/issues/329) + - ome_identity_pool - The module is enhanced to support check mode and idempotency. + (https://github.com/dell/dellemc-openmanage-ansible-modules/issues/328) + - ome_template_identity_pool - The module is enhanced to support check mode + and idempotency. + - redfish_event_subscription - The module is enhanced to support check mode + and idempotency. + release_summary: + Support for OpenManage Enterprise Modular server interface + management. modules: - - description: Configures server interface profiles on OpenManage Enterprise Modular. - name: ome_server_interface_profiles - namespace: '' - - description: Retrieves the information of server interface profile on OpenManage Enterprise Modular. - name: ome_server_interface_profile_info - namespace: '' - release_date: '2022-02-24' + - description: + Retrieves the information of server interface profile on OpenManage + Enterprise Modular. + name: ome_server_interface_profile_info + namespace: "" + - description: Configures server interface profiles on OpenManage Enterprise Modular. + name: ome_server_interface_profiles + namespace: "" + release_date: "2022-02-24" 5.2.0: changes: - minor_changes: - - ome_template - The module is enhanced to support check mode and - idempotency. - (https://github.com/dell/dellemc-openmanage-ansible-modules/issues/255) - - ome_template - The module is enhanced to support modifying a template - based on the attribute names instead of the ID. - (https://github.com/dell/dellemc-openmanage-ansible-modules/issues/358) - - ome_profile - The module is enhanced to support check mode and - idempotency. - - ome_profile - The module is enhanced to support modifying a profile - based on the attribute names instead of the ID. - - ome_diagnostics - The module is enhanced to support check mode and - idempotency. - (https://github.com/dell/dellemc-openmanage-ansible-modules/issues/345) - - ome_diagnostics - This module is enhanced to extract log from - lead chassis. - (https://github.com/dell/dellemc-openmanage-ansible-modules/issues/310) - - idrac_redfish_storage_controller - This module is enhanced to support - the following settings with check mode and idempotency - UnassignSpare, - EnableControllerEncryption, BlinkTarget, UnBlinkTarget, ConvertToRAID, - ConvertToNonRAID, ChangePDStateToOnline, ChangePDStateToOffline. known_issues: - - ome_application_console_preferences - Issue(224690) - The module does - not display a proper error message when an unsupported value is provided - for the parameters report_row_limit, email_sender_settings, and - metric_collection_settings, and the value is applied on OpenManage Enterprise. - - ome_device_quick_deploy - Issue(216352) - The module does not display a - proper error message if an unsupported value is provided for the - ipv6_prefix_length and vlan_id parameters. - - ome_device_local_access_configuration - Issue(217865) - The module does not - display a proper error message if an unsupported value is provided for the - user_defined and lcd_language parameters. - - ome_device_local_access_configuration - Issue(215035) - The module reports - ``Successfully updated the local access setting`` if an unsupported value is - provided for the parameter timeout_limit. However, this value is not - actually applied on OpenManage Enterprise Modular. - - ome_device_network_services - Issue(212681) - The module does not provide a - proper error message if unsupported values are provided for the parameters- - port_number, community_name, max_sessions, max_auth_retries, and idle_timeout. - - ome_application_alerts_syslog - Issue(215374) - The module does not provide a - proper error message if the destination_address is more than 255 characters. - - ome_application_alerts_smtp - Issue(212310) - The module does not provide a - proper error message if the destination_address is more than 255 characters. - idrac_user - Issue(192043) The module may error out with the message ``unable to perform the import or export operation because there are pending attribute changes or a configuration job is in progress``. Wait for the job to complete and run the task again. + - ome_application_alerts_smtp - Issue(212310) - The module does not provide + a proper error message if the destination_address is more than 255 characters. + - ome_application_alerts_syslog - Issue(215374) - The module does not provide + a proper error message if the destination_address is more than 255 characters. + - ome_application_console_preferences - Issue(224690) - The module does not + display a proper error message when an unsupported value is provided for the + parameters report_row_limit, email_sender_settings, and metric_collection_settings, + and the value is applied on OpenManage Enterprise. + - ome_device_local_access_configuration - Issue(215035) - The module reports + ``Successfully updated the local access setting`` if an unsupported value + is provided for the parameter timeout_limit. However, this value is not actually + applied on OpenManage Enterprise Modular. + - ome_device_local_access_configuration - Issue(217865) - The module does not + display a proper error message if an unsupported value is provided for the + user_defined and lcd_language parameters. + - ome_device_network_services - Issue(212681) - The module does not provide + a proper error message if unsupported values are provided for the parameters- + port_number, community_name, max_sessions, max_auth_retries, and idle_timeout. + - ome_device_power_settings - Issue(212679) - The module displays the following + message if the value provided for the parameter ``power_cap`` is not within + the supported range of 0 to 32767, ``Unable to complete the request because + PowerCap does not exist or is not applicable for the resource URI.`` + - ome_device_quick_deploy - Issue(216352) - The module does not display a proper + error message if an unsupported value is provided for the ipv6_prefix_length + and vlan_id parameters. - ome_smart_fabric_uplink - Issue(186024) - The module does not allow the creation of multiple uplinks of the same name even though it is supported by OpenManage Enterprise Modular. If an uplink is created using the same name as an existing uplink, the existing uplink is modified. - - ome_device_power_settings - Issue(212679) - The module displays the following - message if the value provided for the parameter ``power_cap`` is not within - the supported range of 0 to 32767, ``Unable to complete the request - because PowerCap does not exist or is not applicable for the resource URI.`` + minor_changes: + - idrac_redfish_storage_controller - This module is enhanced to support the + following settings with check mode and idempotency - UnassignSpare, EnableControllerEncryption, + BlinkTarget, UnBlinkTarget, ConvertToRAID, ConvertToNonRAID, ChangePDStateToOnline, + ChangePDStateToOffline. + - ome_diagnostics - The module is enhanced to support check mode and idempotency. + (https://github.com/dell/dellemc-openmanage-ansible-modules/issues/345) + - ome_diagnostics - This module is enhanced to extract log from lead chassis. + (https://github.com/dell/dellemc-openmanage-ansible-modules/issues/310) + - ome_profile - The module is enhanced to support check mode and idempotency. + - ome_profile - The module is enhanced to support modifying a profile based + on the attribute names instead of the ID. + - ome_template - The module is enhanced to support check mode and idempotency. + (https://github.com/dell/dellemc-openmanage-ansible-modules/issues/255) + - ome_template - The module is enhanced to support modifying a template based + on the attribute names instead of the ID. (https://github.com/dell/dellemc-openmanage-ansible-modules/issues/358) release_summary: Support to configure console preferences on OpenManage Enterprise. modules: - - description: Configures console preferences on OpenManage Enterprise. - name: ome_application_console_preferences - namespace: '' - release_date: '2022-03-29' + - description: Configures console preferences on OpenManage Enterprise. + name: ome_application_console_preferences + namespace: "" + release_date: "2022-03-29" 5.3.0: changes: - minor_changes: - - redfish_storage_volume - The module is enhanced to support check mode and idempotency. - (https://github.com/dell/dellemc-openmanage-ansible-modules/issues/245) - - ome_smart_fabric_uplink - The module is enhanced to support idempotency. - (https://github.com/dell/dellemc-openmanage-ansible-modules/issues/253) - - ome_diagnostics - The module is enhanced to support debug logs. - (https://github.com/dell/dellemc-openmanage-ansible-modules/issues/308) - - ome_diagnostics - Added "supportassist_collection" as a choice for the log_type argument - to export SupportAssist logs. - (https://github.com/dell/dellemc-openmanage-ansible-modules/issues/309) known_issues: - - ome_application_console_preferences - Issue(224690) - The module does - not display a proper error message when an unsupported value is provided - for the parameters report_row_limit, email_sender_settings, and - metric_collection_settings, and the value is applied on OpenManage Enterprise. - - ome_device_quick_deploy - Issue(216352) - The module does not display a - proper error message if an unsupported value is provided for the - ipv6_prefix_length and vlan_id parameters. - - ome_device_local_access_configuration - Issue(217865) - The module does not - display a proper error message if an unsupported value is provided for the - user_defined and lcd_language parameters. - - ome_device_local_access_configuration - Issue(215035) - The module reports - ``Successfully updated the local access setting`` if an unsupported value is - provided for the parameter timeout_limit. However, this value is not - actually applied on OpenManage Enterprise Modular. - - ome_device_network_services - Issue(212681) - The module does not provide a - proper error message if unsupported values are provided for the parameters- - port_number, community_name, max_sessions, max_auth_retries, and idle_timeout. - - ome_application_alerts_syslog - Issue(215374) - The module does not provide a - proper error message if the destination_address is more than 255 characters. - - ome_application_alerts_smtp - Issue(212310) - The module does not provide a - proper error message if the destination_address is more than 255 characters. - idrac_user - Issue(192043) The module may error out with the message ``unable to perform the import or export operation because there are pending attribute changes or a configuration job is in progress``. Wait for the job to complete and run the task again. + - ome_application_alerts_smtp - Issue(212310) - The module does not provide + a proper error message if the destination_address is more than 255 characters. + - ome_application_alerts_syslog - Issue(215374) - The module does not provide + a proper error message if the destination_address is more than 255 characters. + - ome_application_console_preferences - Issue(224690) - The module does not + display a proper error message when an unsupported value is provided for the + parameters report_row_limit, email_sender_settings, and metric_collection_settings, + and the value is applied on OpenManage Enterprise. + - ome_device_local_access_configuration - Issue(215035) - The module reports + ``Successfully updated the local access setting`` if an unsupported value + is provided for the parameter timeout_limit. However, this value is not actually + applied on OpenManage Enterprise Modular. + - ome_device_local_access_configuration - Issue(217865) - The module does not + display a proper error message if an unsupported value is provided for the + user_defined and lcd_language parameters. + - ome_device_network_services - Issue(212681) - The module does not provide + a proper error message if unsupported values are provided for the parameters- + port_number, community_name, max_sessions, max_auth_retries, and idle_timeout. + - ome_device_power_settings - Issue(212679) - The module displays the following + message if the value provided for the parameter ``power_cap`` is not within + the supported range of 0 to 32767, ``Unable to complete the request because + PowerCap does not exist or is not applicable for the resource URI.`` + - ome_device_quick_deploy - Issue(216352) - The module does not display a proper + error message if an unsupported value is provided for the ipv6_prefix_length + and vlan_id parameters. - ome_smart_fabric_uplink - Issue(186024) - The module does not allow the creation of multiple uplinks of the same name even though it is supported by OpenManage Enterprise Modular. If an uplink is created using the same name as an existing uplink, the existing uplink is modified. - - ome_device_power_settings - Issue(212679) - The module displays the following - message if the value provided for the parameter ``power_cap`` is not within - the supported range of 0 to 32767, ``Unable to complete the request - because PowerCap does not exist or is not applicable for the resource URI.`` - release_summary: Added check mode and idempotency support for redfish_storage_volume - and idempotency support for ome_smart_fabric_uplink. For ome_diagnostics, added - support for debug logs and added supportassist_collection as a choice for the log_type - argument to export SupportAssist logs. - release_date: '2022-04-26' + minor_changes: + - ome_diagnostics - Added "supportassist_collection" as a choice for the log_type + argument to export SupportAssist logs. (https://github.com/dell/dellemc-openmanage-ansible-modules/issues/309) + - ome_diagnostics - The module is enhanced to support debug logs. (https://github.com/dell/dellemc-openmanage-ansible-modules/issues/308) + - ome_smart_fabric_uplink - The module is enhanced to support idempotency. (https://github.com/dell/dellemc-openmanage-ansible-modules/issues/253) + - redfish_storage_volume - The module is enhanced to support check mode and + idempotency. (https://github.com/dell/dellemc-openmanage-ansible-modules/issues/245) + release_summary: + Added check mode and idempotency support for redfish_storage_volume + and idempotency support for ome_smart_fabric_uplink. For ome_diagnostics, + added support for debug logs and added supportassist_collection as a choice + for the log_type argument to export SupportAssist logs. + release_date: "2022-04-26" 5.4.0: changes: - major_changes: - - idrac_server_config_profile - The module is enhanced to support export, - import, and preview the SCP configuration using Redfish and added support - for check mode. known_issues: - - ome_application_console_preferences - Issue(224690) - The module does - not display a proper error message when an unsupported value is provided - for the parameters report_row_limit, email_sender_settings, and - metric_collection_settings, and the value is applied on OpenManage Enterprise. - - ome_device_quick_deploy - Issue(216352) - The module does not display a - proper error message if an unsupported value is provided for the - ipv6_prefix_length and vlan_id parameters. - - ome_device_local_access_configuration - Issue(217865) - The module does not - display a proper error message if an unsupported value is provided for the - user_defined and lcd_language parameters. - - ome_device_local_access_configuration - Issue(215035) - The module reports - ``Successfully updated the local access setting`` if an unsupported value is - provided for the parameter timeout_limit. However, this value is not - actually applied on OpenManage Enterprise Modular. - - ome_device_network_services - Issue(212681) - The module does not provide a - proper error message if unsupported values are provided for the parameters- - port_number, community_name, max_sessions, max_auth_retries, and idle_timeout. - - ome_application_alerts_syslog - Issue(215374) - The module does not provide a - proper error message if the destination_address is more than 255 characters. - - ome_application_alerts_smtp - Issue(212310) - The module does not provide a - proper error message if the destination_address is more than 255 characters. - idrac_user - Issue(192043) The module may error out with the message ``unable to perform the import or export operation because there are pending attribute changes or a configuration job is in progress``. Wait for the job to complete and run the task again. + - ome_application_alerts_smtp - Issue(212310) - The module does not provide + a proper error message if the destination_address is more than 255 characters. + - ome_application_alerts_syslog - Issue(215374) - The module does not provide + a proper error message if the destination_address is more than 255 characters. + - ome_application_console_preferences - Issue(224690) - The module does not + display a proper error message when an unsupported value is provided for the + parameters report_row_limit, email_sender_settings, and metric_collection_settings, + and the value is applied on OpenManage Enterprise. + - ome_device_local_access_configuration - Issue(215035) - The module reports + ``Successfully updated the local access setting`` if an unsupported value + is provided for the parameter timeout_limit. However, this value is not actually + applied on OpenManage Enterprise Modular. + - ome_device_local_access_configuration - Issue(217865) - The module does not + display a proper error message if an unsupported value is provided for the + user_defined and lcd_language parameters. + - ome_device_network_services - Issue(212681) - The module does not provide + a proper error message if unsupported values are provided for the parameters- + port_number, community_name, max_sessions, max_auth_retries, and idle_timeout. + - ome_device_power_settings - Issue(212679) - The module displays the following + message if the value provided for the parameter ``power_cap`` is not within + the supported range of 0 to 32767, ``Unable to complete the request because + PowerCap does not exist or is not applicable for the resource URI.`` + - ome_device_quick_deploy - Issue(216352) - The module does not display a proper + error message if an unsupported value is provided for the ipv6_prefix_length + and vlan_id parameters. - ome_smart_fabric_uplink - Issue(186024) - The module does not allow the creation of multiple uplinks of the same name even though it is supported by OpenManage Enterprise Modular. If an uplink is created using the same name as an existing uplink, the existing uplink is modified. - - ome_device_power_settings - Issue(212679) - The module displays the following - message if the value provided for the parameter ``power_cap`` is not within - the supported range of 0 to 32767, ``Unable to complete the request - because PowerCap does not exist or is not applicable for the resource URI.`` - release_summary: Support for export, import, and preview the Server Configuration + major_changes: + - idrac_server_config_profile - The module is enhanced to support export, import, + and preview the SCP configuration using Redfish and added support for check + mode. + release_summary: + Support for export, import, and preview the Server Configuration Profile (SCP) configuration using Redfish and added support for check mode. - release_date: '2022-05-26' + release_date: "2022-05-26" 5.5.0: changes: - minor_changes: - - redfish_firmware - This module is updated to use the Job Service URL instead of - Task Service URL for job tracking. - - idrac_redfish_storage_controller - This module is updated to use the Job Service URL - instead of Task Service URL for job tracking. - - idrac_server_config_profile - This module is updated to use the Job Service URL - instead of Task Service URL for job tracking. bugfixes: - - ome_application_console_preferences - Issue(224690) - The module does - not display a proper error message when an unsupported value is provided - for the parameters report_row_limit, email_sender_settings, and - metric_collection_settings, and the value is applied on OpenManage Enterprise - - idrac_server_config_profile - Issue(234817) – When an XML format is exported - using the SCP, the module breaks while waiting for the job completion. + - "idrac_server_config_profile - Issue(234817) \u2013 When an XML format is + exported using the SCP, the module breaks while waiting for the job completion." + - ome_application_console_preferences - Issue(224690) - The module does not + display a proper error message when an unsupported value is provided for the + parameters report_row_limit, email_sender_settings, and metric_collection_settings, + and the value is applied on OpenManage Enterprise known_issues: - - ome_device_quick_deploy - Issue(216352) - The module does not display a - proper error message if an unsupported value is provided for the - ipv6_prefix_length and vlan_id parameters. - - ome_device_local_access_configuration - Issue(217865) - The module does not - display a proper error message if an unsupported value is provided for the - user_defined and lcd_language parameters. - - ome_device_local_access_configuration - Issue(215035) - The module reports - ``Successfully updated the local access setting`` if an unsupported value is - provided for the parameter timeout_limit. However, this value is not - actually applied on OpenManage Enterprise Modular. - - ome_device_network_services - Issue(212681) - The module does not provide a - proper error message if unsupported values are provided for the parameters- - port_number, community_name, max_sessions, max_auth_retries, and idle_timeout. - - ome_application_alerts_syslog - Issue(215374) - The module does not provide a - proper error message if the destination_address is more than 255 characters. - - ome_application_alerts_smtp - Issue(212310) - The module does not provide a - proper error message if the destination_address is more than 255 characters. - idrac_user - Issue(192043) The module may error out with the message ``unable to perform the import or export operation because there are pending attribute changes or a configuration job is in progress``. Wait for the job to complete and run the task again. + - ome_application_alerts_smtp - Issue(212310) - The module does not provide + a proper error message if the destination_address is more than 255 characters. + - ome_application_alerts_syslog - Issue(215374) - The module does not provide + a proper error message if the destination_address is more than 255 characters. + - ome_device_local_access_configuration - Issue(215035) - The module reports + ``Successfully updated the local access setting`` if an unsupported value + is provided for the parameter timeout_limit. However, this value is not actually + applied on OpenManage Enterprise Modular. + - ome_device_local_access_configuration - Issue(217865) - The module does not + display a proper error message if an unsupported value is provided for the + user_defined and lcd_language parameters. + - ome_device_network_services - Issue(212681) - The module does not provide + a proper error message if unsupported values are provided for the parameters- + port_number, community_name, max_sessions, max_auth_retries, and idle_timeout. + - ome_device_power_settings - Issue(212679) - The module displays the following + message if the value provided for the parameter ``power_cap`` is not within + the supported range of 0 to 32767, ``Unable to complete the request because + PowerCap does not exist or is not applicable for the resource URI.`` + - ome_device_quick_deploy - Issue(216352) - The module does not display a proper + error message if an unsupported value is provided for the ipv6_prefix_length + and vlan_id parameters. - ome_smart_fabric_uplink - Issue(186024) - The module does not allow the creation of multiple uplinks of the same name even though it is supported by OpenManage Enterprise Modular. If an uplink is created using the same name as an existing uplink, the existing uplink is modified. - - ome_device_power_settings - Issue(212679) - The module displays the following - message if the value provided for the parameter ``power_cap`` is not within - the supported range of 0 to 32767, ``Unable to complete the request - because PowerCap does not exist or is not applicable for the resource URI.`` - release_summary: Support to generate certificate signing request, import, and export - certificates on iDRAC. + minor_changes: + - idrac_redfish_storage_controller - This module is updated to use the Job Service + URL instead of Task Service URL for job tracking. + - idrac_server_config_profile - This module is updated to use the Job Service + URL instead of Task Service URL for job tracking. + - redfish_firmware - This module is updated to use the Job Service URL instead + of Task Service URL for job tracking. + release_summary: + Support to generate certificate signing request, import, and + export certificates on iDRAC. modules: - description: Configure certificates for iDRAC. name: idrac_certificates - namespace: '' - release_date: '2022-06-29' + namespace: "" + release_date: "2022-06-29" 6.0.0: changes: - major_changes: - - The share parameters are deprecated from the following modules - idrac_network, - idrac_timezone_ntp, dellemc_configure_idrac_eventing, dellemc_configure_idrac_services, - dellemc_idrac_lc_attributes, dellemc_system_lockdown_mode. - - Added collection metadata for creating execution environments. - - Refactored the Markdown (MD) files and content for better readability. known_issues: - - ome_device_quick_deploy - Issue(216352) - The module does not display a - proper error message if an unsupported value is provided for the - ipv6_prefix_length and vlan_id parameters. - - ome_device_local_access_configuration - Issue(217865) - The module does not - display a proper error message if an unsupported value is provided for the - user_defined and lcd_language parameters. - - ome_device_local_access_configuration - Issue(215035) - The module reports - ``Successfully updated the local access setting`` if an unsupported value is - provided for the parameter timeout_limit. However, this value is not - actually applied on OpenManage Enterprise Modular. - - ome_device_network_services - Issue(212681) - The module does not provide a - proper error message if unsupported values are provided for the parameters- - port_number, community_name, max_sessions, max_auth_retries, and idle_timeout. - - ome_application_alerts_syslog - Issue(215374) - The module does not provide a - proper error message if the destination_address is more than 255 characters. - - ome_application_alerts_smtp - Issue(212310) - The module does not provide a - proper error message if the destination_address is more than 255 characters. - idrac_user - Issue(192043) The module may error out with the message ``unable to perform the import or export operation because there are pending attribute changes or a configuration job is in progress``. Wait for the job to complete and run the task again. + - ome_application_alerts_smtp - Issue(212310) - The module does not provide + a proper error message if the destination_address is more than 255 characters. + - ome_application_alerts_syslog - Issue(215374) - The module does not provide + a proper error message if the destination_address is more than 255 characters. + - ome_device_local_access_configuration - Issue(215035) - The module reports + ``Successfully updated the local access setting`` if an unsupported value + is provided for the parameter timeout_limit. However, this value is not actually + applied on OpenManage Enterprise Modular. + - ome_device_local_access_configuration - Issue(217865) - The module does not + display a proper error message if an unsupported value is provided for the + user_defined and lcd_language parameters. + - ome_device_network_services - Issue(212681) - The module does not provide + a proper error message if unsupported values are provided for the parameters- + port_number, community_name, max_sessions, max_auth_retries, and idle_timeout. + - ome_device_power_settings - Issue(212679) - The module displays the following + message if the value provided for the parameter ``power_cap`` is not within + the supported range of 0 to 32767, ``Unable to complete the request because + PowerCap does not exist or is not applicable for the resource URI.`` + - ome_device_quick_deploy - Issue(216352) - The module does not display a proper + error message if an unsupported value is provided for the ipv6_prefix_length + and vlan_id parameters. - ome_smart_fabric_uplink - Issue(186024) - The module does not allow the creation of multiple uplinks of the same name even though it is supported by OpenManage Enterprise Modular. If an uplink is created using the same name as an existing uplink, the existing uplink is modified. - - ome_device_power_settings - Issue(212679) - The module displays the following - message if the value provided for the parameter ``power_cap`` is not within - the supported range of 0 to 32767, ``Unable to complete the request - because PowerCap does not exist or is not applicable for the resource URI.`` - release_summary: Added collection metadata for creating execution environments, + major_changes: + - Added collection metadata for creating execution environments. + - Refactored the Markdown (MD) files and content for better readability. + - The share parameters are deprecated from the following modules - idrac_network, + idrac_timezone_ntp, dellemc_configure_idrac_eventing, dellemc_configure_idrac_services, + dellemc_idrac_lc_attributes, dellemc_system_lockdown_mode. + release_summary: + Added collection metadata for creating execution environments, deprecation of share parameters, and support for configuring iDRAC attributes using idrac_attributes module. modules: - description: Configure the iDRAC attributes name: idrac_attributes - namespace: '' - release_date: '2022-07-28' + namespace: "" + release_date: "2022-07-28" 6.1.0: changes: - major_changes: - - ome_devices - Support for performing device-specific operations on OpenManage Enterprise. - - idrac_boot - Support for configuring the boot settings on iDRAC. - - ome_device_group - The module is enhanced to support the removal of devices from a static device group. - minor_changes: - - ome_configuration_compliance_info - The module is enhanced to report single device compliance information. known_issues: - - ome_device_quick_deploy - Issue(216352) - The module does not display a - proper error message if an unsupported value is provided for the - ipv6_prefix_length and vlan_id parameters. - - ome_device_local_access_configuration - Issue(217865) - The module does not - display a proper error message if an unsupported value is provided for the - user_defined and lcd_language parameters. - - ome_device_local_access_configuration - Issue(215035) - The module reports - ``Successfully updated the local access setting`` if an unsupported value is - provided for the parameter timeout_limit. However, this value is not - actually applied on OpenManage Enterprise Modular. - - ome_device_network_services - Issue(212681) - The module does not provide a - proper error message if unsupported values are provided for the parameters- - port_number, community_name, max_sessions, max_auth_retries, and idle_timeout. - - ome_application_alerts_syslog - Issue(215374) - The module does not provide a - proper error message if the destination_address is more than 255 characters. - - ome_application_alerts_smtp - Issue(212310) - The module does not provide a - proper error message if the destination_address is more than 255 characters. - idrac_user - Issue(192043) The module may error out with the message ``unable to perform the import or export operation because there are pending attribute changes or a configuration job is in progress``. Wait for the job to complete and run the task again. + - ome_application_alerts_smtp - Issue(212310) - The module does not provide + a proper error message if the destination_address is more than 255 characters. + - ome_application_alerts_syslog - Issue(215374) - The module does not provide + a proper error message if the destination_address is more than 255 characters. + - ome_device_local_access_configuration - Issue(215035) - The module reports + ``Successfully updated the local access setting`` if an unsupported value + is provided for the parameter timeout_limit. However, this value is not actually + applied on OpenManage Enterprise Modular. + - ome_device_local_access_configuration - Issue(217865) - The module does not + display a proper error message if an unsupported value is provided for the + user_defined and lcd_language parameters. + - ome_device_network_services - Issue(212681) - The module does not provide + a proper error message if unsupported values are provided for the parameters- + port_number, community_name, max_sessions, max_auth_retries, and idle_timeout. + - ome_device_power_settings - Issue(212679) - The module displays the following + message if the value provided for the parameter ``power_cap`` is not within + the supported range of 0 to 32767, ``Unable to complete the request because + PowerCap does not exist or is not applicable for the resource URI.`` + - ome_device_quick_deploy - Issue(216352) - The module does not display a proper + error message if an unsupported value is provided for the ipv6_prefix_length + and vlan_id parameters. - ome_smart_fabric_uplink - Issue(186024) - The module does not allow the creation of multiple uplinks of the same name even though it is supported by OpenManage Enterprise Modular. If an uplink is created using the same name as an existing uplink, the existing uplink is modified. - - ome_device_power_settings - Issue(212679) - The module displays the following - message if the value provided for the parameter ``power_cap`` is not within - the supported range of 0 to 32767, ``Unable to complete the request - because PowerCap does not exist or is not applicable for the resource URI.`` - release_summary: Support for device-specific operations on OpenManage Enterprise and configuring boot settings on iDRAC. + major_changes: + - idrac_boot - Support for configuring the boot settings on iDRAC. + - ome_device_group - The module is enhanced to support the removal of devices + from a static device group. + - ome_devices - Support for performing device-specific operations on OpenManage + Enterprise. + minor_changes: + - ome_configuration_compliance_info - The module is enhanced to report single + device compliance information. + release_summary: + Support for device-specific operations on OpenManage Enterprise + and configuring boot settings on iDRAC. modules: - - description: Perform device-specific operations on target devices - name: ome_devices - namespace: '' - description: Configure the boot order settings. name: idrac_boot - namespace: '' - release_date: '2022-08-26' + namespace: "" + - description: Perform device-specific operations on target devices + name: ome_devices + namespace: "" + release_date: "2022-08-26" 6.2.0: changes: - major_changes: - - idrac_bios - The module is enhanced to support clear pending BIOS attributes, - reset BIOS to default settings, and configure BIOS attribute using Redfish. known_issues: - - ome_device_network_services - Issue(212681) - The module does not provide a - proper error message if unsupported values are provided for the parameters- - port_number, community_name, max_sessions, max_auth_retries, and idle_timeout. - - ome_application_alerts_syslog - Issue(215374) - The module does not provide a - proper error message if the destination_address is more than 255 characters. - idrac_user - Issue(192043) The module may error out with the message ``unable to perform the import or export operation because there are pending attribute changes or a configuration job is in progress``. Wait for the job to complete and run the task again. + - ome_application_alerts_syslog - Issue(215374) - The module does not provide + a proper error message if the destination_address is more than 255 characters. + - ome_device_network_services - Issue(212681) - The module does not provide + a proper error message if unsupported values are provided for the parameters- + port_number, community_name, max_sessions, max_auth_retries, and idle_timeout. + - ome_device_power_settings - Issue(212679) - The module displays the following + message if the value provided for the parameter ``power_cap`` is not within + the supported range of 0 to 32767, ``Unable to complete the request because + PowerCap does not exist or is not applicable for the resource URI.`` - ome_smart_fabric_uplink - Issue(186024) - The module does not allow the creation of multiple uplinks of the same name even though it is supported by OpenManage Enterprise Modular. If an uplink is created using the same name as an existing uplink, the existing uplink is modified. - - ome_device_power_settings - Issue(212679) - The module displays the following - message if the value provided for the parameter ``power_cap`` is not within - the supported range of 0 to 32767, ``Unable to complete the request - because PowerCap does not exist or is not applicable for the resource URI.`` - release_summary: Added clear pending BIOS attributes, reset BIOS to default settings, - and configure BIOS attribute using Redfish enhancements for idrac_bios. - release_date: '2022-09-28' + major_changes: + - idrac_bios - The module is enhanced to support clear pending BIOS attributes, + reset BIOS to default settings, and configure BIOS attribute using Redfish. + release_summary: + Added clear pending BIOS attributes, reset BIOS to default + settings, and configure BIOS attribute using Redfish enhancements for idrac_bios. + release_date: "2022-09-28" 6.3.0: changes: - major_changes: - - idrac_virtual_media - This module allows to configure Remote File Share settings. - - idrac_redfish_storage_controller - This module is enhanced to support - LockVirtualDisk operation. known_issues: - - ome_device_network_services - Issue(212681) - The module does not provide a - proper error message if unsupported values are provided for the parameters- - port_number, community_name, max_sessions, max_auth_retries, and idle_timeout. - - ome_application_alerts_syslog - Issue(215374) - The module does not provide a - proper error message if the destination_address is more than 255 characters. - idrac_user - Issue(192043) The module may error out with the message ``unable to perform the import or export operation because there are pending attribute changes or a configuration job is in progress``. Wait for the job to complete and run the task again. + - ome_application_alerts_syslog - Issue(215374) - The module does not provide + a proper error message if the destination_address is more than 255 characters. + - ome_device_network_services - Issue(212681) - The module does not provide + a proper error message if unsupported values are provided for the parameters- + port_number, community_name, max_sessions, max_auth_retries, and idle_timeout. + - ome_device_power_settings - Issue(212679) - The module displays the following + message if the value provided for the parameter ``power_cap`` is not within + the supported range of 0 to 32767, ``Unable to complete the request because + PowerCap does not exist or is not applicable for the resource URI.`` - ome_smart_fabric_uplink - Issue(186024) - The module does not allow the creation of multiple uplinks of the same name even though it is supported by OpenManage Enterprise Modular. If an uplink is created using the same name as an existing uplink, the existing uplink is modified. - - ome_device_power_settings - Issue(212679) - The module displays the following - message if the value provided for the parameter ``power_cap`` is not within - the supported range of 0 to 32767, ``Unable to complete the request - because PowerCap does not exist or is not applicable for the resource URI.`` - release_summary: Support for LockVirtualDisk operation and to configure Remote File - Share settings using idrac_virtual_media module. + major_changes: + - idrac_redfish_storage_controller - This module is enhanced to support LockVirtualDisk + operation. + - idrac_virtual_media - This module allows to configure Remote File Share settings. + release_summary: + Support for LockVirtualDisk operation and to configure Remote + File Share settings using idrac_virtual_media module. modules: - description: Configure the virtual media settings. name: idrac_virtual_media - namespace: '' - release_date: '2022-10-28' + namespace: "" + release_date: "2022-10-28" 7.0.0: changes: - major_changes: - - Rebranded from Dell EMC to Dell. - - idrac_firmware - This module is enhanced to support proxy. - - idrac_user_info - This module allows to retrieve iDRAC Local user information details. known_issues: - - idrac_firmware - Issue(249879) - Firmware update of iDRAC9-based Servers - fails if SOCKS proxy with authentication is used. - - ome_device_network_services - Issue(212681) - The module does not provide a - proper error message if unsupported values are provided for the parameters- - port_number, community_name, max_sessions, max_auth_retries, and idle_timeout. - - ome_device_power_settings - Issue(212679) - The module displays the following - message if the value provided for the parameter ``power_cap`` is not within - the supported range of 0 to 32767, ``Unable to complete the request - because PowerCap does not exist or is not applicable for the resource URI.`` - - ome_application_alerts_syslog - Issue(215374) - The module does not provide a - proper error message if the destination_address is more than 255 characters. + - idrac_firmware - Issue(249879) - Firmware update of iDRAC9-based Servers fails + if SOCKS proxy with authentication is used. - idrac_user - Issue(192043) The module may error out with the message ``unable to perform the import or export operation because there are pending attribute changes or a configuration job is in progress``. Wait for the job to complete and run the task again. + - ome_application_alerts_syslog - Issue(215374) - The module does not provide + a proper error message if the destination_address is more than 255 characters. + - ome_device_network_services - Issue(212681) - The module does not provide + a proper error message if unsupported values are provided for the parameters- + port_number, community_name, max_sessions, max_auth_retries, and idle_timeout. + - ome_device_power_settings - Issue(212679) - The module displays the following + message if the value provided for the parameter ``power_cap`` is not within + the supported range of 0 to 32767, ``Unable to complete the request because + PowerCap does not exist or is not applicable for the resource URI.`` - ome_smart_fabric_uplink - Issue(186024) - The module does not allow the creation of multiple uplinks of the same name even though it is supported by OpenManage Enterprise Modular. If an uplink is created using the same name as an existing uplink, the existing uplink is modified. - release_summary: Rebranded from Dell EMC to Dell, enhanced idrac_firmware module - to support proxy, and added support to retrieve iDRAC local user details. + major_changes: + - Rebranded from Dell EMC to Dell. + - idrac_firmware - This module is enhanced to support proxy. + - idrac_user_info - This module allows to retrieve iDRAC Local user information + details. + release_summary: + Rebranded from Dell EMC to Dell, enhanced idrac_firmware module + to support proxy, and added support to retrieve iDRAC local user details. modules: - description: Retrieve iDRAC Local user details. name: idrac_user_info - namespace: '' - release_date: '2022-11-28' + namespace: "" + release_date: "2022-11-28" 7.1.0: changes: - major_changes: - - ome_smart_fabric_info - This module retrieves the list of smart fabrics in - the inventory of OpenManage Enterprise Modular. - - ome_smart_fabric_uplink_info - This module retrieve details of fabric uplink - on OpenManage Enterprise Modular. - - ome_inventory - This plugin allows to create a inventory from the group on - OpenManage Enterprise. - - Support for IPv6 address for OMSDK dependent iDRAC modules. - minor_changes: - - redfish_firmware - This module supports timeout option. known_issues: - - idrac_firmware - Issue(249879) - Firmware update of iDRAC9-based Servers - fails if SOCKS proxy with authentication is used. - - ome_device_network_services - Issue(212681) - The module does not provide a - proper error message if unsupported values are provided for the parameters- - port_number, community_name, max_sessions, max_auth_retries, and idle_timeout. - - ome_device_power_settings - Issue(212679) - The module displays the following - message if the value provided for the parameter ``power_cap`` is not within - the supported range of 0 to 32767, ``Unable to complete the request - because PowerCap does not exist or is not applicable for the resource URI.`` - - ome_application_alerts_syslog - Issue(215374) - The module does not provide a - proper error message if the destination_address is more than 255 characters. + - idrac_firmware - Issue(249879) - Firmware update of iDRAC9-based Servers fails + if SOCKS proxy with authentication is used. - idrac_user - Issue(192043) The module may error out with the message ``unable to perform the import or export operation because there are pending attribute changes or a configuration job is in progress``. Wait for the job to complete and run the task again. + - ome_application_alerts_syslog - Issue(215374) - The module does not provide + a proper error message if the destination_address is more than 255 characters. + - ome_device_network_services - Issue(212681) - The module does not provide + a proper error message if unsupported values are provided for the parameters- + port_number, community_name, max_sessions, max_auth_retries, and idle_timeout. + - ome_device_power_settings - Issue(212679) - The module displays the following + message if the value provided for the parameter ``power_cap`` is not within + the supported range of 0 to 32767, ``Unable to complete the request because + PowerCap does not exist or is not applicable for the resource URI.`` - ome_smart_fabric_uplink - Issue(186024) - The module does not allow the creation of multiple uplinks of the same name even though it is supported by OpenManage Enterprise Modular. If an uplink is created using the same name as an existing uplink, the existing uplink is modified. - release_summary: Support for retrieving smart fabric and smart fabric uplink + major_changes: + - Support for IPv6 address for OMSDK dependent iDRAC modules. + - ome_inventory - This plugin allows to create a inventory from the group on + OpenManage Enterprise. + - ome_smart_fabric_info - This module retrieves the list of smart fabrics in + the inventory of OpenManage Enterprise Modular. + - ome_smart_fabric_uplink_info - This module retrieve details of fabric uplink + on OpenManage Enterprise Modular. + minor_changes: + - redfish_firmware - This module supports timeout option. + release_summary: + Support for retrieving smart fabric and smart fabric uplink information and support for IPv6 address for OMSDK dependent iDRAC modules. modules: - - description: Retrieves the information of smart fabrics inventoried by OpenManage Enterprise Modular + - description: + Retrieves the information of smart fabrics inventoried by OpenManage + Enterprise Modular name: ome_smart_fabric_info - namespace: '' + namespace: "" - description: Retrieve details of fabric uplink on OpenManage Enterprise Modular. name: ome_smart_fabric_uplink_info - namespace: '' - release_date: '2022-12-28' + namespace: "" + plugins: + inventory: + - description: Group inventory plugin on OpenManage Enterprise. + name: ome_inventory + namespace: null + release_date: "2022-12-28" 7.2.0: changes: - major_changes: - - ome_inventory - This plugin is enhanced to support inventory retrieval of System and - Plugin Groups of OpenManage Enterprise. - - idrac_redfish_storage_controller - This module is enhanced to configure controller - attributes and online capacity expansion. - - ome_template_network_vlan_info - This module allows to retrieve the network - configuration of a template on OpenManage Enterprise or OpenManage Enterprise Modular. - - ome_profile_info - This module allows to retrieve profiles with attributes on OpenManage - Enterprise or OpenManage Enterprise Modular. - - ome_domian_user_groups - This module allows to import the LDAP directory groups. known_issues: - - ome_device_network_services - Issue(212681) - The module does not provide a - proper error message if unsupported values are provided for the parameters- - port_number, community_name, max_sessions, max_auth_retries, and idle_timeout. - - ome_device_power_settings - Issue(212679) - The module displays the following - message if the value provided for the parameter ``power_cap`` is not within - the supported range of 0 to 32767, ``Unable to complete the request - because PowerCap does not exist or is not applicable for the resource URI.`` - - ome_application_alerts_syslog - Issue(215374) - The module does not provide a - proper error message if the destination_address is more than 255 characters. + - idrac_redfish_storage_contoller - Issue(256164) - If incorrect value is provided + for one of the attributes in the provided attribute list for controller configuration, + then this module does not exit with error. - idrac_user - Issue(192043) The module may error out with the message ``unable to perform the import or export operation because there are pending attribute changes or a configuration job is in progress``. Wait for the job to complete and run the task again. + - ome_application_alerts_syslog - Issue(215374) - The module does not provide + a proper error message if the destination_address is more than 255 characters. + - ome_device_network_services - Issue(212681) - The module does not provide + a proper error message if unsupported values are provided for the parameters- + port_number, community_name, max_sessions, max_auth_retries, and idle_timeout. + - ome_device_power_settings - Issue(212679) - The module displays the following + message if the value provided for the parameter ``power_cap`` is not within + the supported range of 0 to 32767, ``Unable to complete the request because + PowerCap does not exist or is not applicable for the resource URI.`` + - ome_inventory - Issue(256257) - All hosts are not retrieved for ``Modular + System`` group and corresponding child groups. + - ome_inventory - Issue(256589) - All hosts are not retrieved for ``Custom Groups`` + group and corresponding child groups. + - ome_inventory - Issue(256593) - All hosts are not retrieved for ``PLUGIN GROUPS`` + group and corresponding child groups. - ome_smart_fabric_uplink - Issue(186024) - The module does not allow the creation of multiple uplinks of the same name even though it is supported by OpenManage Enterprise Modular. If an uplink is created using the same name as an existing uplink, the existing uplink is modified. + major_changes: + - idrac_redfish_storage_controller - This module is enhanced to configure controller + attributes and online capacity expansion. + - ome_domian_user_groups - This module allows to import the LDAP directory groups. + - ome_inventory - This plugin is enhanced to support inventory retrieval of + System and Plugin Groups of OpenManage Enterprise. + - ome_profile_info - This module allows to retrieve profiles with attributes + on OpenManage Enterprise or OpenManage Enterprise Modular. + - ome_template_network_vlan_info - This module allows to retrieve the network + configuration of a template on OpenManage Enterprise or OpenManage Enterprise + Modular. + release_summary: + Support for retrieving the inventory and host details of all + child groups using parent groups, retrieving inventory of System and Plugin + Groups, retrieving profiles with attributes, retrieving network configuration + of a template, configuring controller attributes, configuring online capacity + expansion, and importing the LDAP directory. + modules: + - description: Retrieve profiles with attribute details + name: ome_profile_info + namespace: "" + - description: Retrieves network configuration of template. + name: ome_template_network_vlan_info + namespace: "" + release_date: "2023-01-30" + 7.3.0: + changes: + known_issues: - idrac_redfish_storage_contoller - Issue(256164) - If incorrect value is provided - for one of the attributes in the provided attribute list for controller - configuration, then this module does not exit with error. + for one of the attributes in the provided attribute list for controller configuration, + then this module does not exit with error. + - idrac_user - Issue(192043) The module may error out with the message ``unable + to perform the import or export operation because there are pending attribute + changes or a configuration job is in progress``. Wait for the job to complete + and run the task again. + - ome_application_alerts_syslog - Issue(215374) - The module does not provide + a proper error message if the destination_address is more than 255 characters. + - ome_device_network_services - Issue(212681) - The module does not provide + a proper error message if unsupported values are provided for the parameters- + port_number, community_name, max_sessions, max_auth_retries, and idle_timeout. + - ome_device_power_settings - Issue(212679) - The module displays the following + message if the value provided for the parameter ``power_cap`` is not within + the supported range of 0 to 32767, ``Unable to complete the request because + PowerCap does not exist or is not applicable for the resource URI.`` + - ome_inventory - Issue(256257) - All hosts are not retrieved for ``Modular + System`` group and corresponding child groups. - ome_inventory - Issue(256589) - All hosts are not retrieved for ``Custom Groups`` group and corresponding child groups. - ome_inventory - Issue(256593) - All hosts are not retrieved for ``PLUGIN GROUPS`` group and corresponding child groups. - - ome_inventory - Issue(256257) - All hosts are not retrieved for ``Modular System`` - group and corresponding child groups. - release_summary: Support for retrieving the inventory and host details of all child - groups using parent groups, retrieving inventory of System and Plugin Groups, retrieving - profiles with attributes, retrieving network configuration of a template, configuring - controller attributes, configuring online capacity expansion, and importing the LDAP directory. - modules: - - description: Retrieves network configuration of template. - name: ome_template_network_vlan_info - namespace: '' - - description: Retrieve profiles with attribute details - name: ome_profile_info - namespace: '' - release_date: '2023-01-30' + - ome_smart_fabric_uplink - Issue(186024) - The module does not allow the creation + of multiple uplinks of the same name even though it is supported by OpenManage + Enterprise Modular. If an uplink is created using the same name as an existing + uplink, the existing uplink is modified. + major_changes: + - idrac_server_config_profile - This module is enhanced to support proxy settings, + import buffer, include in export, and ignore certificate warning. + release_summary: + Support for iDRAC export Server Configuration Profile role + and proxy settings, import buffer, include in export, and ignore + certificate warning. + objects: + role: + - description: Role to export iDRAC Server Configuration Profile (SCP). + name: idrac_export_server_config_profile + namespace: null + release_date: "2023-02-28" diff --git a/changelogs/config.yaml b/changelogs/config.yaml index 7153a4fa5..605228ca1 100644 --- a/changelogs/config.yaml +++ b/changelogs/config.yaml @@ -10,22 +10,22 @@ notesdir: fragments prelude_section_name: release_summary prelude_section_title: Release Summary sections: -- - major_changes - - Major Changes -- - minor_changes - - Minor Changes -- - breaking_changes - - Breaking Changes / Porting Guide -- - deprecated_features - - Deprecated Features -- - removed_features - - Removed Features (previously deprecated) -- - security_fixes - - Security Fixes -- - bugfixes - - Bugfixes -- - known_issues - - Known Issues + - - major_changes + - Major Changes + - - minor_changes + - Minor Changes + - - breaking_changes + - Breaking Changes / Porting Guide + - - deprecated_features + - Deprecated Features + - - removed_features + - Removed Features (previously deprecated) + - - security_fixes + - Security Fixes + - - bugfixes + - Bugfixes + - - known_issues + - Known Issues title: Dell OpenManage Ansible Modules trivial_section_name: trivial use_fqcn: true diff --git a/docs/EXECUTION_ENVIRONMENT.md b/docs/EXECUTION_ENVIRONMENT.md index 0c00e9f42..b103b8cdb 100644 --- a/docs/EXECUTION_ENVIRONMENT.md +++ b/docs/EXECUTION_ENVIRONMENT.md @@ -104,7 +104,7 @@ password=password - hosts: idrac connection: local name: Get system inventory - gather_facts: False + gather_facts: false tasks: - name: Get system inventory. diff --git a/docs/modules/idrac_server_config_profile.rst b/docs/modules/idrac_server_config_profile.rst index 10f28472c..007218daf 100644 --- a/docs/modules/idrac_server_config_profile.rst +++ b/docs/modules/idrac_server_config_profile.rst @@ -12,7 +12,7 @@ idrac_server_config_profile -- Export or Import iDRAC Server Configuration Profi Synopsis -------- -Export the Server Configuration Profile (SCP) from the iDRAC or import from a network share (CIFS, NFS, HTTP, HTTPS) or a local file. +Export the Server Configuration Profile (SCP) from the iDRAC or import from a network share (CIFS, NFS, HTTP, HTTPS) or a local path. @@ -20,7 +20,7 @@ Requirements ------------ The below requirements are needed on the host that executes this module. -- python >= 3.8.6 +- python >= 3.9.14 @@ -39,11 +39,13 @@ Parameters Whether to wait for job completion or not. - share_name (True, str, None) + share_name (optional, str, None) Network share or local path. CIFS, NFS, HTTP, and HTTPS network share types are supported. + *share_name* is mutually exclusive with *import_buffer*. + share_user (optional, str, None) Network share user in the format 'user@domain' or 'domain\\user' if user is part of a domain else 'user'. This option is mandatory for CIFS Network Share. @@ -63,7 +65,7 @@ Parameters *export_format* is used if the valid extension file is not provided for ``import``. - scp_components (optional, str, ALL) + scp_components (optional, list, ALL) If ``ALL``, this module exports or imports all components configurations from SCP file. If ``IDRAC``, this module exports or imports iDRAC configuration from SCP file. @@ -74,6 +76,8 @@ Parameters If ``RAID``, this module exports or imports RAID configuration from SCP file. + When *command* is ``export`` or ``import`` *target* with multiple components is supported only on iDRAC9 with firmware 6.10.00.00 and above. + shutdown_type (optional, str, Graceful) This option is applicable for ``import`` command. @@ -98,7 +102,83 @@ Parameters export_use (optional, str, Default) - Specify the type of server configuration profile (SCP) to be exported. This option is applicable for ``export`` command. + Specify the type of Server Configuration Profile (SCP) to be exported. + + This option is applicable when *command* is ``export``. + + ``Default`` Creates a non-destructive snapshot of the configuration. + + ``Replace`` Replaces a server with another or restores the servers settings to a known baseline. + + ``Clone`` Clones settings from one server to another server with the identical hardware setup. All settings except I/O identity are updated (e.g. will reset RAID). The settings in this export will be destructive when uploaded to another system. + + + ignore_certificate_warning (optional, str, ignore) + If ``ignore``, it ignores the certificate warnings. + + If ``showerror``, it shows the certificate warnings. + + *ignore_certificate_warning* is considered only when *share_name* is of type HTTPS and is supported only on iDRAC9. + + + include_in_export (optional, str, default) + This option is applicable when *command* is ``export``. + + If ``default``, it exports the default Server Configuration Profile. + + If ``readonly``, it exports the SCP with readonly attributes. + + If ``passwordhashvalues``, it exports the SCP with password hash values. + + If ``customtelemetry``, exports the SCP with custom telemetry attributes supported only in the iDRAC9. + + + import_buffer (optional, str, None) + Used to import the buffer input of xml or json into the iDRAC. + + This option is applicable when *command* is ``import`` and ``preview``. + + *import_buffer* is mutually exclusive with *share_name*. + + + proxy_support (optional, bool, False) + Proxy to be enabled or disabled. + + *proxy_support* is considered only when *share_name* is of type HTTP or HTTPS and is supported only on iDRAC9. + + + proxy_type (optional, str, http) + ``http`` to select HTTP type proxy. + + ``socks4`` to select SOCKS4 type proxy. + + *proxy_type* is considered only when *share_name* is of type HTTP or HTTPS and is supported only on iDRAC9. + + + proxy_server (optional, str, None) + *proxy_server* is required when *share_name* is of type HTTPS or HTTP and *proxy_support* is ``true``. + + *proxy_server* is considered only when *share_name* is of type HTTP or HTTPS and is supported only on iDRAC9. + + + proxy_port (optional, str, 80) + Proxy port to authenticate. + + *proxy_port* is required when *share_name* is of type HTTPS or HTTP and *proxy_support* is ``true``. + + *proxy_port* is considered only when *share_name* is of type HTTP or HTTPS and is supported only on iDRAC9. + + + proxy_username (optional, str, None) + Proxy username to authenticate. + + *proxy_username* is considered only when *share_name* is of type HTTP or HTTPS and is supported only on iDRAC9. + + + proxy_password (optional, str, None) + Proxy password to authenticate. + + *proxy_password* is considered only when *share_name* is of type HTTP or HTTPS and is supported only on iDRAC9. idrac_ip (True, str, None) @@ -144,6 +224,7 @@ Notes - Run this module from a system that has direct access to Dell iDRAC. - This module supports ``check_mode``. - To import Server Configuration Profile (SCP) on the iDRAC7 and iDRAC8-based servers, the servers must have iDRAC Enterprise license or later. + - For ``import`` operation, ``check_mode`` is supported only when *target* is ``ALL``. @@ -162,11 +243,12 @@ Examples idrac_password: "user_password" ca_path: "/path/to/ca_cert.pem" share_name: "/scp_folder" - scp_components: IDRAC + scp_components: + - IDRAC scp_file: example_file export_format: JSON export_use: Clone - job_wait: True + job_wait: true - name: Import SCP with IDRAC components in JSON format from a local path dellemc.openmanage.idrac_server_config_profile: @@ -176,11 +258,12 @@ Examples ca_path: "/path/to/ca_cert.pem" share_name: "/scp_folder" command: import - scp_components: "IDRAC" + scp_components: + - IDRAC scp_file: example_file.json shutdown_type: Graceful end_host_power_state: "On" - job_wait: False + job_wait: false - 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: @@ -189,10 +272,11 @@ Examples idrac_password: "user_password" ca_path: "/path/to/ca_cert.pem" share_name: "192.168.0.2:/share" - scp_components: "BIOS" + scp_components: + - BIOS export_format: XML export_use: Default - job_wait: True + job_wait: true - name: Import SCP with BIOS components in XML format from a NFS share path dellemc.openmanage.idrac_server_config_profile: @@ -202,11 +286,12 @@ Examples ca_path: "/path/to/ca_cert.pem" share_name: "192.168.0.2:/share" command: import - scp_components: "BIOS" + scp_components: + - BIOS scp_file: 192.168.0.1_20210618_162856.xml shutdown_type: NoReboot end_host_power_state: "Off" - job_wait: False + job_wait: false - 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: @@ -217,12 +302,12 @@ Examples 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" + scp_components: + - RAID export_format: XML export_use: Default - job_wait: True + job_wait: true - name: Import SCP with RAID components in XML format from a CIFS share path dellemc.openmanage.idrac_server_config_profile: @@ -233,13 +318,13 @@ Examples 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_components: + - RAID scp_file: example_file.xml shutdown_type: Forced end_host_power_state: "On" - job_wait: True + job_wait: true - name: Export SCP with ALL components in JSON format to a HTTP share path dellemc.openmanage.idrac_server_config_profile: @@ -251,9 +336,10 @@ Examples share_user: share_username share_password: share_password scp_file: example_file.json - scp_components: ALL + scp_components: + - ALL export_format: JSON - job_wait: False + job_wait: false - name: Import SCP with ALL components in JSON format from a HTTP share path dellemc.openmanage.idrac_server_config_profile: @@ -268,7 +354,7 @@ Examples scp_file: example_file.json shutdown_type: Graceful end_host_power_state: "On" - job_wait: True + job_wait: true - name: Export SCP with ALL components in XML format to a HTTPS share path without SCP file name dellemc.openmanage.idrac_server_config_profile: @@ -279,10 +365,11 @@ Examples share_name: "https://192.168.0.4/share" share_user: share_username share_password: share_password - scp_components: ALL + scp_components: + - ALL export_format: XML export_use: Replace - job_wait: True + job_wait: true - name: Import SCP with ALL components in XML format from a HTTPS share path dellemc.openmanage.idrac_server_config_profile: @@ -297,9 +384,9 @@ Examples scp_file: 192.168.0.1_20160618_164647.xml shutdown_type: Graceful end_host_power_state: "On" - job_wait: False + job_wait: false - - name: Preview SCP with ALL components in XML format from a CIFS share path + - name: Preview SCP with IDRAC components in XML format from a CIFS share path dellemc.openmanage.idrac_server_config_profile: idrac_ip: "{{ idrac_ip }}" idrac_user: "{{ idrac_user }}" @@ -309,11 +396,12 @@ Examples share_user: share_username share_password: share_password command: preview - scp_components: "ALL" + scp_components: + - ALL scp_file: example_file.xml - job_wait: True + job_wait: true - - name: Preview SCP with ALL components in JSON format from a NFS share path + - 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 }}" @@ -321,11 +409,12 @@ Examples ca_path: "/path/to/ca_cert.pem" share_name: "192.168.0.2:/share" command: preview - scp_components: "IDRAC" + scp_components: + - IDRAC scp_file: example_file.xml - job_wait: True + job_wait: true - - name: Preview SCP with ALL components in XML format from a HTTP share path + - name: Preview SCP with IDRAC components in XML format from a HTTP share path dellemc.openmanage.idrac_server_config_profile: idrac_ip: "{{ idrac_ip }}" idrac_user: "{{ idrac_user }}" @@ -335,11 +424,12 @@ Examples share_user: share_username share_password: share_password command: preview - scp_components: "ALL" + scp_components: + - ALL scp_file: example_file.xml - job_wait: True + job_wait: true - - name: Preview SCP with ALL components in XML format from a local path + - 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 }}" @@ -347,9 +437,72 @@ Examples ca_path: "/path/to/ca_cert.pem" share_name: "/scp_folder" command: preview - scp_components: "IDRAC" + scp_components: + - IDRAC scp_file: example_file.json - job_wait: False + job_wait: false + + - 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: " + Disabled" + + - 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: "http://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 + + - 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 + + - 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\"}]}]}}" diff --git a/galaxy.yml b/galaxy.yml index 7c9bbfe68..30b414af5 100644 --- a/galaxy.yml +++ b/galaxy.yml @@ -1,14 +1,14 @@ namespace: dellemc name: openmanage -version: 7.2.0 +version: 7.3.0 readme: README.md authors: -- Jagadeesh N V -- Felix Stephen -- Sachin Apagundi -- Husniya Hameed -- Abhishek Sinha -- Kritika Bhateja + - Jagadeesh N V + - Felix Stephen + - Sachin Apagundi + - Husniya Hameed + - Abhishek Sinha + - Kritika Bhateja description: Dell OpenManage Ansible Modules allows data center and IT administrators to use RedHat Ansible to automate and orchestrate the @@ -19,8 +19,21 @@ description: Dell OpenManage Ansible Modules allows data center and IT license_file: LICENSE -tags: ['dell', 'dellemc', 'openmanage', 'infrastructure', 'idrac', 'ome', 'openmanage_enterprise', - 'redfish', 'redfish_api', 'poweredge_servers', 'automation', 'devops'] +tags: + [ + "dell", + "dellemc", + "openmanage", + "infrastructure", + "idrac", + "ome", + "openmanage_enterprise", + "redfish", + "redfish_api", + "poweredge_servers", + "automation", + "devops", + ] dependencies: {} diff --git a/meta/runtime.yml b/meta/runtime.yml index d550a6d38..c9941f2a7 100644 --- a/meta/runtime.yml +++ b/meta/runtime.yml @@ -1,5 +1,5 @@ --- -requires_ansible: '>=2.10.0' +requires_ansible: ">=2.11.0" plugin_routing: modules: dellemc_get_firmware_inventory: @@ -33,4 +33,4 @@ plugin_routing: idrac_timezone_ntp: deprecation: removal_date: "2024-07-31" - warning_text: idrac_timezone_ntp will be removed in a future release of this collection. Use dellemc.openmanage.idrac_attributes instead. \ No newline at end of file + warning_text: idrac_timezone_ntp will be removed in a future release of this collection. Use dellemc.openmanage.idrac_attributes instead. diff --git a/playbooks/idrac/dellemc_idrac_storage_volume.yml b/playbooks/idrac/dellemc_idrac_storage_volume.yml index d81640658..480067692 100644 --- a/playbooks/idrac/dellemc_idrac_storage_volume.yml +++ b/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. + 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] + 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,69 @@ 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: + 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" + 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" + 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" + 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" + tags: + - view_all_volume diff --git a/playbooks/idrac/deprecated/dellemc_configure_idrac_eventing.yml b/playbooks/idrac/deprecated/dellemc_configure_idrac_eventing.yml index c712288e7..c6f220d0c 100644 --- a/playbooks/idrac/deprecated/dellemc_configure_idrac_eventing.yml +++ b/playbooks/idrac/deprecated/dellemc_configure_idrac_eventing.yml @@ -2,61 +2,58 @@ - hosts: idrac connection: local name: Configure the iDRAC eventing attributes - gather_facts: False - - collections: - - dellemc.openmanage + 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" + + 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" + + 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" + + 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" + + tags: + - idrac_alerts diff --git a/playbooks/idrac/deprecated/dellemc_configure_idrac_services.yml b/playbooks/idrac/deprecated/dellemc_configure_idrac_services.yml index e0d4bbe87..f03a604fd 100644 --- a/playbooks/idrac/deprecated/dellemc_configure_idrac_services.yml +++ b/playbooks/idrac/deprecated/dellemc_configure_idrac_services.yml @@ -2,45 +2,42 @@ - hosts: idrac connection: local name: Configure the iDRAC services attributes - gather_facts: False - - collections: - - dellemc.openmanage + 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" + - 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" - tags: - - idrac_webserver + 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" - 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 + tags: + - idrac-snmp-settings diff --git a/playbooks/idrac/deprecated/dellemc_get_firmware_inventory.yml b/playbooks/idrac/deprecated/dellemc_get_firmware_inventory.yml index ac4736c5f..68dd6b90c 100644 --- a/playbooks/idrac/deprecated/dellemc_get_firmware_inventory.yml +++ b/playbooks/idrac/deprecated/dellemc_get_firmware_inventory.yml @@ -2,15 +2,12 @@ - hosts: idrac connection: local name: Get Installed Firmware Inventory - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false 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" + - name: Get Installed Firmware Inventory + dellemc.openmanage.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/playbooks/idrac/deprecated/dellemc_get_system_inventory.yml b/playbooks/idrac/deprecated/dellemc_get_system_inventory.yml index 085b14bfe..c9aca9046 100644 --- a/playbooks/idrac/deprecated/dellemc_get_system_inventory.yml +++ b/playbooks/idrac/deprecated/dellemc_get_system_inventory.yml @@ -2,15 +2,12 @@ - hosts: idrac connection: local name: Get system inventory - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false 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" + - name: Get system inventory + dellemc.openmanage.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/playbooks/idrac/deprecated/dellemc_idrac_lc_attributes.yml b/playbooks/idrac/deprecated/dellemc_idrac_lc_attributes.yml index 51a06ad1e..4ba342e5b 100644 --- a/playbooks/idrac/deprecated/dellemc_idrac_lc_attributes.yml +++ b/playbooks/idrac/deprecated/dellemc_idrac_lc_attributes.yml @@ -2,16 +2,13 @@ - hosts: idrac connection: local name: Configure iDRAC CSIOR Setting - gather_facts: False - - collections: - - dellemc.openmanage + 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" diff --git a/playbooks/idrac/deprecated/dellemc_system_lockdown_mode.yml b/playbooks/idrac/deprecated/dellemc_system_lockdown_mode.yml index 61260e3eb..e63d607bf 100644 --- a/playbooks/idrac/deprecated/dellemc_system_lockdown_mode.yml +++ b/playbooks/idrac/deprecated/dellemc_system_lockdown_mode.yml @@ -2,16 +2,13 @@ - hosts: idrac connection: local name: Configure System lockdown mode - gather_facts: False - - collections: - - dellemc.openmanage + 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" diff --git a/playbooks/idrac/deprecated/idrac_network.yml b/playbooks/idrac/deprecated/idrac_network.yml index 9ee11728a..0d963734d 100644 --- a/playbooks/idrac/deprecated/idrac_network.yml +++ b/playbooks/idrac/deprecated/idrac_network.yml @@ -2,74 +2,71 @@ - hosts: idrac connection: local name: Configure the iDRAC network attributes - gather_facts: False - - collections: - - dellemc.openmanage + 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" + - 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" - tags: - - dns_register + 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" + - 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" - tags: - - setup_vlan + 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" + - 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" - tags: - - idrac_nic + tags: + - idrac_nic - - 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 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" - tags: - - idrac_ipv4 + tags: + - idrac_ipv4 - - 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 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" - tags: - - idrac_staticipv4 \ No newline at end of file + tags: + - idrac_staticipv4 diff --git a/playbooks/idrac/deprecated/idrac_timezone_ntp.yml b/playbooks/idrac/deprecated/idrac_timezone_ntp.yml index c5fe77911..00c6b417f 100644 --- a/playbooks/idrac/deprecated/idrac_timezone_ntp.yml +++ b/playbooks/idrac/deprecated/idrac_timezone_ntp.yml @@ -2,23 +2,20 @@ - hosts: idrac connection: local name: Configure the iDRAC timezone attributes - gather_facts: False - - collections: - - dellemc.openmanage + 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" + - 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" - tags: - - idrac_timezone \ No newline at end of file + tags: + - idrac_timezone diff --git a/playbooks/idrac/idrac_attributes.yml b/playbooks/idrac/idrac_attributes.yml index 9a3621761..ff0fc342c 100644 --- a/playbooks/idrac/idrac_attributes.yml +++ b/playbooks/idrac/idrac_attributes.yml @@ -2,24 +2,21 @@ - hosts: idrac connection: local name: Dell OpenManage Ansible iDRAC Certificates management. - gather_facts: False - - collections: - - dellemc.openmanage + 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 - name: Update System attributes - idrac_attributes: + dellemc.openmanage.idrac_attributes: idrac_ip: "{{ idrac_ip }}" idrac_user: "{{ idrac_user }}" idrac_password: "{{ idrac_password }}" @@ -29,7 +26,7 @@ tags: system - name: Update Lifecycle Controller attributes - idrac_attributes: + dellemc.openmanage.idrac_attributes: idrac_ip: "{{ idrac_ip }}" idrac_user: "{{ idrac_user }}" idrac_password: "{{ idrac_password }}" @@ -39,7 +36,7 @@ tags: lc - 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 }}" @@ -51,7 +48,7 @@ tags: email-alerts - 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 }}" @@ -63,7 +60,7 @@ tags: snmp-alerts - 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 }}" @@ -77,7 +74,7 @@ tags: smtp-alerts - 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 }}" @@ -88,7 +85,7 @@ tags: webserver-settings - 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 }}" @@ -102,7 +99,7 @@ tags: snmp-settings - 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 }}" @@ -112,7 +109,7 @@ tags: collect-inventory - 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" @@ -125,7 +122,7 @@ tags: lcd-config - 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" diff --git a/playbooks/idrac/idrac_bios.yml b/playbooks/idrac/idrac_bios.yml index a541dce7a..7bd79137c 100644 --- a/playbooks/idrac/idrac_bios.yml +++ b/playbooks/idrac/idrac_bios.yml @@ -2,114 +2,111 @@ - hosts: idrac connection: local name: Configure Boot Mode Setting - gather_facts: False - - collections: - - dellemc.openmanage + 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: + + - 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 - - 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 - - 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 - - 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 - - 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 - - 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 - - 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 diff --git a/playbooks/idrac/idrac_boot.yml b/playbooks/idrac/idrac_boot.yml index 22afb949a..a1ef75741 100644 --- a/playbooks/idrac/idrac_boot.yml +++ b/playbooks/idrac/idrac_boot.yml @@ -2,68 +2,64 @@ - hosts: idrac connection: local name: Configure the boot order settings - gather_facts: False - - collections: - - dellemc.openmanage + 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 - - 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 - - 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 - - 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 - - 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 diff --git a/playbooks/idrac/idrac_boot_virtual_media_workflow.yml b/playbooks/idrac/idrac_boot_virtual_media_workflow.yml index aa6d43ed5..8a052c997 100644 --- a/playbooks/idrac/idrac_boot_virtual_media_workflow.yml +++ b/playbooks/idrac/idrac_boot_virtual_media_workflow.yml @@ -9,48 +9,46 @@ 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 -# 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 # Eject the virtual media after boot. diff --git a/playbooks/idrac/idrac_certificates.yml b/playbooks/idrac/idrac_certificates.yml index 801f12ed5..713af6ba3 100644 --- a/playbooks/idrac/idrac_certificates.yml +++ b/playbooks/idrac/idrac_certificates.yml @@ -2,20 +2,17 @@ - hosts: idrac connection: local name: Dell OpenManage Ansible iDRAC Certificates management. - gather_facts: False - - collections: - - dellemc.openmanage + 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" @@ -29,41 +26,41 @@ - 192.198.2.1 - 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" - 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" - 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" - 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" diff --git a/playbooks/idrac/idrac_firmware.yml b/playbooks/idrac/idrac_firmware.yml index 0c3edf517..86f354ef0 100644 --- a/playbooks/idrac/idrac_firmware.yml +++ b/playbooks/idrac/idrac_firmware.yml @@ -2,85 +2,82 @@ - hosts: idrac connection: local name: Update Firmware Inventory - gather_facts: False - - collections: - - dellemc.openmanage + 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 - - name: Update firmware from repository on a HTTP/HTTP/FTP repository via proxy - 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" + - 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" - - 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" - - 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" - - 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" - - name: Firmware compliance report using HTTPS 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: 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 diff --git a/playbooks/idrac/idrac_firmware_info.yml b/playbooks/idrac/idrac_firmware_info.yml index aaca53a58..fc51a4680 100644 --- a/playbooks/idrac/idrac_firmware_info.yml +++ b/playbooks/idrac/idrac_firmware_info.yml @@ -2,15 +2,12 @@ - hosts: idrac connection: local name: Get Installed Firmware Inventory - gather_facts: False - - collections: - - dellemc.openmanage + 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" diff --git a/playbooks/idrac/idrac_lifecycle_controller_job_status_info.yml b/playbooks/idrac/idrac_lifecycle_controller_job_status_info.yml index 9f0f61deb..9a01ee81f 100644 --- a/playbooks/idrac/idrac_lifecycle_controller_job_status_info.yml +++ b/playbooks/idrac/idrac_lifecycle_controller_job_status_info.yml @@ -2,16 +2,13 @@ - hosts: idrac connection: local name: Get LC job Status - gather_facts: False - - collections: - - dellemc.openmanage + 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" diff --git a/playbooks/idrac/idrac_lifecycle_controller_jobs.yml b/playbooks/idrac/idrac_lifecycle_controller_jobs.yml index 495e84a66..74ccd828f 100644 --- a/playbooks/idrac/idrac_lifecycle_controller_jobs.yml +++ b/playbooks/idrac/idrac_lifecycle_controller_jobs.yml @@ -2,27 +2,24 @@ - hosts: idrac connection: local name: Delete LC job - gather_facts: False - - collections: - - dellemc.openmanage + 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 - - 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 diff --git a/playbooks/idrac/idrac_lifecycle_controller_logs.yml b/playbooks/idrac/idrac_lifecycle_controller_logs.yml index 99c9d0cef..57979e045 100644 --- a/playbooks/idrac/idrac_lifecycle_controller_logs.yml +++ b/playbooks/idrac/idrac_lifecycle_controller_logs.yml @@ -2,17 +2,14 @@ - hosts: idrac connection: local name: Export Lifecycle Controller Logs - gather_facts: False - - collections: - - dellemc.openmanage + 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" diff --git a/playbooks/idrac/idrac_lifecycle_controller_status_info.yml b/playbooks/idrac/idrac_lifecycle_controller_status_info.yml index 1798ab99e..8432ff893 100644 --- a/playbooks/idrac/idrac_lifecycle_controller_status_info.yml +++ b/playbooks/idrac/idrac_lifecycle_controller_status_info.yml @@ -2,15 +2,12 @@ - hosts: idrac connection: local name: Check LC Ready Status - gather_facts: False - - collections: - - dellemc.openmanage + 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" diff --git a/playbooks/idrac/idrac_os_deployment.yml b/playbooks/idrac/idrac_os_deployment.yml index 3ad52adc1..480918827 100644 --- a/playbooks/idrac/idrac_os_deployment.yml +++ b/playbooks/idrac/idrac_os_deployment.yml @@ -1,22 +1,18 @@ ---- +--- - hosts: idrac connection: local 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 - tags: - - network_iso \ No newline at end of file + - network_iso diff --git a/playbooks/idrac/idrac_redfish_storage_controller.yml b/playbooks/idrac/idrac_redfish_storage_controller.yml index 72a3f51d0..5df28e10f 100644 --- a/playbooks/idrac/idrac_redfish_storage_controller.yml +++ b/playbooks/idrac/idrac_redfish_storage_controller.yml @@ -4,15 +4,13 @@ name: Dell OpenManage Ansible iDRAC Redfish Storage Controller service. gather_facts: false - collections: - - dellemc.openmanage - tasks: - name: Assign dedicated hot spare. - idrac_redfish_storage_controller: + 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" @@ -21,17 +19,18 @@ - assign_dedicated_hot_spare - name: Assign global hot spare. - idrac_redfish_storage_controller: + 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 - name: Unassign hot spare - idrac_redfish_storage_controller: + dellemc.openmanage.idrac_redfish_storage_controller: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" @@ -42,7 +41,7 @@ - un-assign-hot-spare - name: Set controller encryption key. - idrac_redfish_storage_controller: + dellemc.openmanage.idrac_redfish_storage_controller: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" @@ -55,7 +54,7 @@ - set_controller_key - name: Rekey in LKM mode. - idrac_redfish_storage_controller: + dellemc.openmanage.idrac_redfish_storage_controller: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" @@ -69,7 +68,7 @@ - rekey_lkm - name: Rekey in SEKM mode. - idrac_redfish_storage_controller: + dellemc.openmanage.idrac_redfish_storage_controller: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" @@ -81,7 +80,7 @@ - rekey_sekm - name: Remove controller key. - idrac_redfish_storage_controller: + dellemc.openmanage.idrac_redfish_storage_controller: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" @@ -92,7 +91,7 @@ - remove_controller_key - name: Reset controller configuration. - idrac_redfish_storage_controller: + dellemc.openmanage.idrac_redfish_storage_controller: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" @@ -103,7 +102,7 @@ - reset_config - name: Enable controller encryption - idrac_redfish_storage_controller: + dellemc.openmanage.idrac_redfish_storage_controller: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" @@ -117,7 +116,7 @@ - enable-encrypt - name: Blink physical disk. - idrac_redfish_storage_controller: + dellemc.openmanage.idrac_redfish_storage_controller: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" @@ -128,7 +127,7 @@ - blink-target - name: Blink virtual drive. - idrac_redfish_storage_controller: + dellemc.openmanage.idrac_redfish_storage_controller: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" @@ -139,7 +138,7 @@ - blink-volume - name: Unblink physical disk. - idrac_redfish_storage_controller: + dellemc.openmanage.idrac_redfish_storage_controller: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" @@ -150,7 +149,7 @@ - unblink-target - name: Unblink virtual drive. - idrac_redfish_storage_controller: + dellemc.openmanage.idrac_redfish_storage_controller: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" @@ -161,7 +160,7 @@ - unblink-drive - name: Convert physical disk to RAID - idrac_redfish_storage_controller: + dellemc.openmanage.idrac_redfish_storage_controller: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" @@ -172,7 +171,7 @@ - convert-raid - name: Convert physical disk to non-RAID - idrac_redfish_storage_controller: + dellemc.openmanage.idrac_redfish_storage_controller: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" @@ -183,7 +182,7 @@ - convert-non-raid - name: Change physical disk state to online. - idrac_redfish_storage_controller: + dellemc.openmanage.idrac_redfish_storage_controller: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" @@ -194,7 +193,7 @@ - pd-state-online - name: Change physical disk state to offline. - idrac_redfish_storage_controller: + dellemc.openmanage.idrac_redfish_storage_controller: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" @@ -205,7 +204,7 @@ - pd-state-offline - name: Lock virtual drive - idrac_redfish_storage_controller: + dellemc.openmanage.idrac_redfish_storage_controller: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" @@ -216,7 +215,7 @@ - lock - name: Online Capacity Expansion of a volume using target - idrac_redfish_storage_controller: + dellemc.openmanage.idrac_redfish_storage_controller: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" @@ -229,7 +228,7 @@ - oce_target - name: Online Capacity Expansion of a volume using size - idrac_redfish_storage_controller: + dellemc.openmanage.idrac_redfish_storage_controller: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" @@ -241,7 +240,7 @@ - oce_size - name: Set controller attributes. - idrac_redfish_storage_controller: + dellemc.openmanage.idrac_redfish_storage_controller: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" @@ -254,7 +253,7 @@ - controller - name: Configure Controller attributes at Maintenance window - idrac_redfish_storage_controller: + dellemc.openmanage.idrac_redfish_storage_controller: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" diff --git a/playbooks/idrac/idrac_redfish_storage_controller_job_tracking.yml b/playbooks/idrac/idrac_redfish_storage_controller_job_tracking.yml index d61112f0f..bef103d2f 100644 --- a/playbooks/idrac/idrac_redfish_storage_controller_job_tracking.yml +++ b/playbooks/idrac/idrac_redfish_storage_controller_job_tracking.yml @@ -1,31 +1,29 @@ --- - 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. + 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" @@ -34,18 +32,19 @@ - assign_dedicated_hot_spare - 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 - name: Set controller encryption key. - idrac_redfish_storage_controller: + dellemc.openmanage.idrac_redfish_storage_controller: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" @@ -59,7 +58,7 @@ - set_controller_key - name: Rekey in LKM mode. - idrac_redfish_storage_controller: + dellemc.openmanage.idrac_redfish_storage_controller: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" @@ -74,7 +73,7 @@ - rekey_lkm - name: Rekey in SEKM mode. - idrac_redfish_storage_controller: + dellemc.openmanage.idrac_redfish_storage_controller: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" @@ -87,7 +86,7 @@ - rekey_sekm - name: Remove controller key. - idrac_redfish_storage_controller: + dellemc.openmanage.idrac_redfish_storage_controller: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" @@ -99,7 +98,7 @@ - remove_controller_key - name: Reset controller configuration. - idrac_redfish_storage_controller: + dellemc.openmanage.idrac_redfish_storage_controller: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" @@ -110,17 +109,17 @@ tags: - reset_config - - 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" @@ -130,9 +129,9 @@ delay: "{{ polling_interval }}" tags: "{{ all_ctrl_task_tags }}" - - 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 }}" diff --git a/playbooks/idrac/idrac_reset.yml b/playbooks/idrac/idrac_reset.yml index 209befd22..d73327b27 100644 --- a/playbooks/idrac/idrac_reset.yml +++ b/playbooks/idrac/idrac_reset.yml @@ -2,18 +2,14 @@ - hosts: idrac connection: local name: Reset iDRAC - gather_facts: False - - collections: - - dellemc.openmanage + 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 diff --git a/playbooks/idrac/idrac_reset_result_tracking.yml b/playbooks/idrac/idrac_reset_result_tracking.yml index 534b22274..6edc4fc12 100644 --- a/playbooks/idrac/idrac_reset_result_tracking.yml +++ b/playbooks/idrac/idrac_reset_result_tracking.yml @@ -2,37 +2,34 @@ - hosts: idrac connection: local name: Reset iDRAC - gather_facts: False - - collections: - - dellemc.openmanage + 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 - 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 - 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 diff --git a/playbooks/idrac/idrac_server_config_profile.yml b/playbooks/idrac/idrac_server_config_profile.yml index 0d61f54c7..7abbe5fd5 100644 --- a/playbooks/idrac/idrac_server_config_profile.yml +++ b/playbooks/idrac/idrac_server_config_profile.yml @@ -2,219 +2,292 @@ - hosts: idrac connection: local name: Server Configuration Profile - gather_facts: False - - collections: - - dellemc.openmanage + 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 - - - 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: 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 + 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 + 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 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 + + - 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 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 + + - 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: " + Disabled" + tags: import-buffer-xml + + - 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 + + - 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 + + - 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 diff --git a/playbooks/idrac/idrac_syslog.yml b/playbooks/idrac/idrac_syslog.yml index 9820b6b69..0881d03c8 100644 --- a/playbooks/idrac/idrac_syslog.yml +++ b/playbooks/idrac/idrac_syslog.yml @@ -2,17 +2,14 @@ - hosts: idrac connection: local name: Configure iDRAC syslog attributes - gather_facts: False - - collections: - - dellemc.openmanage + 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" diff --git a/playbooks/idrac/idrac_system_info.yml b/playbooks/idrac/idrac_system_info.yml index b2f1e1ecc..8de84d08a 100644 --- a/playbooks/idrac/idrac_system_info.yml +++ b/playbooks/idrac/idrac_system_info.yml @@ -2,15 +2,12 @@ - hosts: idrac connection: local name: Get system inventory - gather_facts: False - - collections: - - dellemc.openmanage + 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" diff --git a/playbooks/idrac/idrac_user.yml b/playbooks/idrac/idrac_user.yml index ab011e13a..882bb1645 100644 --- a/playbooks/idrac/idrac_user.yml +++ b/playbooks/idrac/idrac_user.yml @@ -2,70 +2,67 @@ - hosts: idrac connection: local name: Configure the iDRAC users attributes - gather_facts: False - - collections: - - dellemc.openmanage + 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 - - 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 - - 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 - - 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 diff --git a/playbooks/idrac/idrac_user_info.yml b/playbooks/idrac/idrac_user_info.yml index 66fbb67f2..d2d0f26b9 100644 --- a/playbooks/idrac/idrac_user_info.yml +++ b/playbooks/idrac/idrac_user_info.yml @@ -2,21 +2,18 @@ - hosts: idrac connection: local name: Fetching idrac user facts. - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - name: Retrieve basic details of all accounts. - idrac_user_info: + dellemc.openmanage.idrac_user_info: idrac_ip: "{{ idrac_ip }}" idrac_user: "{{ idrac_user }}" idrac_password: "{{ idrac_password }}" ca_path: "/path/to/ca_cert.pem" - name: Retreive user details of a specific user_id - idrac_user_info: + dellemc.openmanage.idrac_user_info: idrac_ip: "{{ idrac_ip }}" idrac_user: "{{ idrac_user }}" idrac_password: "{{ idrac_password }}" @@ -24,7 +21,7 @@ user_id: 1 - name: Retreive user details of a specific username - idrac_user_info: + dellemc.openmanage.idrac_user_info: idrac_ip: "{{ idrac_ip }}" idrac_user: "{{ idrac_user }}" idrac_password: "{{ idrac_password }}" diff --git a/playbooks/idrac/idrac_virtual_media.yml b/playbooks/idrac/idrac_virtual_media.yml index 9a2cc5209..08f0970c8 100644 --- a/playbooks/idrac/idrac_virtual_media.yml +++ b/playbooks/idrac/idrac_virtual_media.yml @@ -2,106 +2,102 @@ - hosts: idrac connection: local name: Configure the boot order settings - gather_facts: False - - collections: - - dellemc.openmanage + 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 - - 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 - - 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 - - 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 - - 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 - - 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 - - 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 diff --git a/playbooks/ome/application/ome_application_alerts_smtp.yml b/playbooks/ome/application/ome_application_alerts_smtp.yml index f77eabdd0..e9efc776d 100644 --- a/playbooks/ome/application/ome_application_alerts_smtp.yml +++ b/playbooks/ome/application/ome_application_alerts_smtp.yml @@ -2,36 +2,33 @@ - hosts: ome connection: local name: Configure the SMTP settings of OME and OME-M. - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - - name: Update SMTP destination server configuration with authentication - ome_application_alerts_smtp: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - destination_address: "localhost" - port_number: 25 - use_ssl: true - enable_authentication: true - credentials: - username: "username" - password: "password" - tags: - - smtp_auth - - name: Update SMTP destination server configuration without authentication - ome_application_alerts_smtp: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - destination_address: "localhost" - port_number: 25 - use_ssl: false - enable_authentication: false - tags: - - smtp_no_auth \ No newline at end of file + - name: Update SMTP destination server configuration with authentication + dellemc.openmanage.ome_application_alerts_smtp: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + destination_address: "localhost" + port_number: 25 + use_ssl: true + enable_authentication: true + credentials: + username: "username" + password: "password" + tags: + - smtp_auth + - name: Update SMTP destination server configuration without authentication + dellemc.openmanage.ome_application_alerts_smtp: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + destination_address: "localhost" + port_number: 25 + use_ssl: false + enable_authentication: false + tags: + - smtp_no_auth diff --git a/playbooks/ome/application/ome_application_alerts_syslog.yml b/playbooks/ome/application/ome_application_alerts_syslog.yml index 9fce647e3..1005a6b07 100644 --- a/playbooks/ome/application/ome_application_alerts_syslog.yml +++ b/playbooks/ome/application/ome_application_alerts_syslog.yml @@ -2,39 +2,36 @@ - hosts: ome connection: local name: Configure syslog forwarding settings on OpenManage Enterprise and OpenManage Enterprise Modular - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - - name: Configure single server to forward syslog - ome_application_alerts_syslog: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - syslog_servers: - - id: 1 - enabled: true - destination_address: 192.168.0.2 - port_number: 514 + - name: Configure single server to forward syslog + dellemc.openmanage.ome_application_alerts_syslog: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + syslog_servers: + - id: 1 + enabled: true + destination_address: 192.168.0.2 + port_number: 514 - - name: Configure multiple server to forward syslog - ome_application_alerts_syslog: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - syslog_servers: - - id: 1 - port_number: 523 - - id: 2 - enabled: true - destination_address: sysloghost1.lab.com - - id: 3 - enabled: false - - id: 4 - enabled: true - destination_address: 192.168.0.4 - port_number: 514 \ No newline at end of file + - name: Configure multiple server to forward syslog + dellemc.openmanage.ome_application_alerts_syslog: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + syslog_servers: + - id: 1 + port_number: 523 + - id: 2 + enabled: true + destination_address: sysloghost1.lab.com + - id: 3 + enabled: false + - id: 4 + enabled: true + destination_address: 192.168.0.4 + port_number: 514 diff --git a/playbooks/ome/application/ome_application_certificate.yml b/playbooks/ome/application/ome_application_certificate.yml index ab0fb9ebc..4356acdb5 100644 --- a/playbooks/ome/application/ome_application_certificate.yml +++ b/playbooks/ome/application/ome_application_certificate.yml @@ -2,52 +2,50 @@ - hosts: ome connection: local name: Dell OME Application Certificate Signing Request. - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - - name: generate certificate signing request. - ome_application_certificate: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - command: "generate_csr" - distinguished_name: "hostname.com" - department_name: "Remote Access Group" - business_name: "Dell Inc." - locality: "Round Rock" - country_state: "Texas" - country: "US" - email: "support@dell.com" - register: result - tags: - - generate + - name: Generate certificate signing request. + dellemc.openmanage.ome_application_certificate: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + command: "generate_csr" + distinguished_name: "hostname.com" + department_name: "Remote Access Group" + business_name: "Dell Inc." + locality: "Round Rock" + country_state: "Texas" + country: "US" + email: "support@dell.com" + register: result + tags: + - generate - - name: copy CSR data into a file. - ansible.builtin.copy: - content: "{{ result.csr_status.CertificateData }}" - dest: "csr_data.txt" - tags: - - csr-data + - name: Copy CSR data into a file. + ansible.builtin.copy: + content: "{{ result.csr_status.CertificateData }}" + dest: "csr_data.txt" + mode: "0600" + tags: + - csr-data - - name: upload the certificate. - ome_application_certificate: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - command: "upload" - upload_file: "/path/certificate.cer" - tags: - - upload + - name: Upload the certificate. + dellemc.openmanage.ome_application_certificate: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + command: "upload" + upload_file: "/path/certificate.cer" + tags: + - upload - - name: "once certificate uploaded, OME cannot be accessed for few seconds, hence wait for 10 seconds." - wait_for: - host: "{{ hostname }}" - port: "{{ port }}" - delay: 10 - tags: - - upload + - name: Once certificate uploaded, OME cannot be accessed for few seconds, hence wait for 10 seconds. + ansible.builtin.wait_for: + host: "{{ hostname }}" + port: "{{ port }}" + delay: 10 + tags: + - upload diff --git a/playbooks/ome/application/ome_application_console_preferences.yml b/playbooks/ome/application/ome_application_console_preferences.yml index b0b29ae97..a46899c38 100644 --- a/playbooks/ome/application/ome_application_console_preferences.yml +++ b/playbooks/ome/application/ome_application_console_preferences.yml @@ -2,96 +2,93 @@ - hosts: ome connection: local name: Dell OME Application Console Preferences. - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - - name: Update Console preferences with all the settings. - ome_application_console_preferences: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - report_row_limit: 123 - device_health: - health_check_interval: 1 - health_check_interval_unit: "Hourly" - health_and_power_state_on_connection_lost: "last_known" - discovery_settings: - general_device_naming: "DNS" - server_device_naming: "IDRAC_HOSTNAME" - invalid_device_hostname: "localhost" - common_mac_addresses: "::" - server_initiated_discovery: - device_discovery_approval_policy: "Automatic" - set_trap_destination: True - mx7000_onboarding_preferences: "all" - builtin_appliance_share: - share_options: "CIFS" - cifs_options: "V1" - email_sender_settings: "admin@dell.com" - trap_forwarding_format: "Original" - metrics_collection_settings: 31 - tags: - - all_settings + - name: Update Console preferences with all the settings. + dellemc.openmanage.ome_application_console_preferences: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + report_row_limit: 123 + device_health: + health_check_interval: 1 + health_check_interval_unit: "Hourly" + health_and_power_state_on_connection_lost: "last_known" + discovery_settings: + general_device_naming: "DNS" + server_device_naming: "IDRAC_HOSTNAME" + invalid_device_hostname: "localhost" + common_mac_addresses: "::" + server_initiated_discovery: + device_discovery_approval_policy: "Automatic" + set_trap_destination: true + mx7000_onboarding_preferences: "all" + builtin_appliance_share: + share_options: "CIFS" + cifs_options: "V1" + email_sender_settings: "admin@dell.com" + trap_forwarding_format: "Original" + metrics_collection_settings: 31 + tags: + - all_settings - - name: Update Console preferences with report and device health settings. - ome_application_console_preferences: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - report_row_limit: 236 - device_health: - health_check_interval: 10 - health_check_interval_unit: "Hourly" - health_and_power_state_on_connection_lost: "last_known" - tags: - - valid_report_device + - name: Update Console preferences with report and device health settings. + dellemc.openmanage.ome_application_console_preferences: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + report_row_limit: 236 + device_health: + health_check_interval: 10 + health_check_interval_unit: "Hourly" + health_and_power_state_on_connection_lost: "last_known" + tags: + - valid_report_device - - name: Update Console preferences with invalid device health settings. - ome_application_console_preferences: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - device_health: - health_check_interval: 65 - health_check_interval_unit: "Minutes" - tags: - - invalid_device + - name: Update Console preferences with invalid device health settings. + dellemc.openmanage.ome_application_console_preferences: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + device_health: + health_check_interval: 65 + health_check_interval_unit: "Minutes" + tags: + - invalid_device - - name: Update Console preferences with discovery and built in appliance share settings. - ome_application_console_preferences: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - discovery_settings: - general_device_naming: "DNS" - server_device_naming: "IDRAC_SYSTEM_HOSTNAME" - invalid_device_hostname: "localhost" - common_mac_addresses: "00:53:45:00:00:00" - builtin_appliance_share: - share_options: "CIFS" - cifs_options: "V1" - tags: - - valid_discovery + - name: Update Console preferences with discovery and built in appliance share settings. + dellemc.openmanage.ome_application_console_preferences: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + discovery_settings: + general_device_naming: "DNS" + server_device_naming: "IDRAC_SYSTEM_HOSTNAME" + invalid_device_hostname: "localhost" + common_mac_addresses: "00:53:45:00:00:00" + builtin_appliance_share: + share_options: "CIFS" + cifs_options: "V1" + tags: + - valid_discovery - - name: Update Console preferences with server initiated discovery, mx7000 onboarding preferences, email sender, trap forwarding format, and metrics collection settings. - ome_application_console_preferences: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - server_initiated_discovery: - device_discovery_approval_policy: "Automatic" - set_trap_destination: True - mx7000_onboarding_preferences: "chassis" - email_sender_settings: "admin@dell.com" - trap_forwarding_format: "Normalized" - metrics_collection_settings: 361 - tags: + - name: Update Console preferences with various settings + dellemc.openmanage.ome_application_console_preferences: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + server_initiated_discovery: + device_discovery_approval_policy: "Automatic" + set_trap_destination: true + mx7000_onboarding_preferences: "chassis" + email_sender_settings: "admin@dell.com" + trap_forwarding_format: "Normalized" + metrics_collection_settings: 361 + tags: - valid_metrics diff --git a/playbooks/ome/application/ome_application_network_address.yml b/playbooks/ome/application/ome_application_network_address.yml index 3eff08bc3..c8e31ad5f 100644 --- a/playbooks/ome/application/ome_application_network_address.yml +++ b/playbooks/ome/application/ome_application_network_address.yml @@ -2,114 +2,112 @@ - hosts: ome connection: local name: Dell OME Application network settings. - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - - name: IPv4 network settings - ome_application_network_address: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" - ca_path: "/path/to/ca_cert.pem" - ipv4_configuration: - enable: true - enable_dhcp: false - static_ip_address: 192.168.0.2 - static_subnet_mask: 255.255.254.0 - static_gateway: 192.168.0.3 - use_dhcp_for_dns_server_names: false - static_preferred_dns_server: 192.168.0.4 - static_alternate_dns_server: "" - reboot_delay: 5 - tags: - - ipv4_config + - name: IPv4 network settings + dellemc.openmanage.ome_application_network_address: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + ipv4_configuration: + enable: true + enable_dhcp: false + static_ip_address: 192.168.0.2 + static_subnet_mask: 255.255.254.0 + static_gateway: 192.168.0.3 + use_dhcp_for_dns_server_names: false + static_preferred_dns_server: 192.168.0.4 + static_alternate_dns_server: "" + reboot_delay: 5 + tags: + - ipv4_config - - name: IPv6 network settings - ome_application_network_address: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" - ca_path: "/path/to/ca_cert.pem" - ipv6_configuration: - enable: true - enable_auto_configuration: true - static_ip_address: 2626:f2f2:f081:9:1c1c:f1f1:4747:1 - static_prefix_length: 10 - static_gateway: 2626:f2f2:f081:9:1c1c:f1f1:4747:2 - use_dhcp_for_dns_server_names: true - static_preferred_dns_server: 2626:f2f2:f081:9:1c1c:f1f1:4747:3 - static_alternate_dns_server: 2626:f2f2:f081:9:1c1c:f1f1:4747:4 - reboot_delay: 10 - tags: - - ipv6_config + - name: IPv6 network settings + dellemc.openmanage.ome_application_network_address: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + ipv6_configuration: + enable: true + enable_auto_configuration: true + static_ip_address: 2626:f2f2:f081:9:1c1c:f1f1:4747:1 + static_prefix_length: 10 + static_gateway: 2626:f2f2:f081:9:1c1c:f1f1:4747:2 + use_dhcp_for_dns_server_names: true + static_preferred_dns_server: 2626:f2f2:f081:9:1c1c:f1f1:4747:3 + static_alternate_dns_server: 2626:f2f2:f081:9:1c1c:f1f1:4747:4 + reboot_delay: 10 + tags: + - ipv6_config - - name: Management vLAN settings for primary interface - ome_application_network_address: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" - ca_path: "/path/to/ca_cert.pem" - management_vlan: - enable_vlan: true - vlan_id: 3344 - dns_configuration: - register_with_dns: false - reboot_delay: 1 - tags: - - mgmt_vlan + - name: Management vLAN settings for primary interface + dellemc.openmanage.ome_application_network_address: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + management_vlan: + enable_vlan: true + vlan_id: 3344 + dns_configuration: + register_with_dns: false + reboot_delay: 1 + tags: + - mgmt_vlan - - name: DNS settings - ome_application_network_address: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" - ca_path: "/path/to/ca_cert.pem" - ipv4_configuration: - enable: true - use_dhcp_for_dns_server_names: false - static_preferred_dns_server: 192.168.0.4 - static_alternate_dns_server: 192.168.0.5 - dns_configuration: - register_with_dns: true - use_dhcp_for_dns_domain_name: false - dns_name: "MX-SVCTAG" - dns_domain_name: "localdomainname" - reboot_delay: 1 - tags: - - dns_config + - name: DNS settings + dellemc.openmanage.ome_application_network_address: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + ipv4_configuration: + enable: true + enable_dhcp: true + use_dhcp_for_dns_server_names: false + static_preferred_dns_server: 192.168.0.4 + static_alternate_dns_server: 192.168.0.5 + dns_configuration: + register_with_dns: true + use_dhcp_for_dns_domain_name: false + dns_name: "MX-SVCTAG" + dns_domain_name: "localdomainname" + reboot_delay: 1 + tags: + - dns_config - - name: Complete network settings - ome_application_network_address: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" - ca_path: "/path/to/ca_cert.pem" - ipv4_configuration: - enable: true - enable_dhcp: false - static_ip_address: 192.168.0.2 - static_subnet_mask: 255.255.254.0 - static_gateway: 192.168.0.3 - use_dhcp_for_dns_server_names: false - static_preferred_dns_server: 192.168.0.4 - static_alternate_dns_server: 192.168.0.5 - ipv6_configuration: - enable: true - enable_auto_configuration: true - static_ip_address: 2626:f2f2:f081:9:1c1c:f1f1:4747:1 - static_prefix_length: 10 - static_gateway: 2626:f2f2:f081:9:1c1c:f1f1:4747:2 - use_dhcp_for_dns_server_names: true - static_preferred_dns_server: 2626:f2f2:f081:9:1c1c:f1f1:4747:3 - static_alternate_dns_server: 2626:f2f2:f081:9:1c1c:f1f1:4747:4 - dns_configuration: - register_with_dns: true - use_dhcp_for_dns_domain_name: false - dns_name: "MX-SVCTAG" - dns_domain_name: "localdomainname" - reboot_delay: 1 - tags: - - all_network_config \ No newline at end of file + - name: Complete network settings + dellemc.openmanage.ome_application_network_address: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + ipv4_configuration: + enable: true + enable_dhcp: false + static_ip_address: 192.168.0.2 + static_subnet_mask: 255.255.254.0 + static_gateway: 192.168.0.3 + use_dhcp_for_dns_server_names: false + static_preferred_dns_server: 192.168.0.4 + static_alternate_dns_server: 192.168.0.5 + ipv6_configuration: + enable: true + enable_auto_configuration: true + static_ip_address: 2626:f2f2:f081:9:1c1c:f1f1:4747:1 + static_prefix_length: 10 + static_gateway: 2626:f2f2:f081:9:1c1c:f1f1:4747:2 + use_dhcp_for_dns_server_names: true + static_preferred_dns_server: 2626:f2f2:f081:9:1c1c:f1f1:4747:3 + static_alternate_dns_server: 2626:f2f2:f081:9:1c1c:f1f1:4747:4 + dns_configuration: + register_with_dns: true + use_dhcp_for_dns_domain_name: false + dns_name: "MX-SVCTAG" + dns_domain_name: "localdomainname" + reboot_delay: 1 + tags: + - all_network_config diff --git a/playbooks/ome/application/ome_application_network_address_with_job_tracking.yml b/playbooks/ome/application/ome_application_network_address_with_job_tracking.yml index 1f4cf709d..2f7bcb4f0 100644 --- a/playbooks/ome/application/ome_application_network_address_with_job_tracking.yml +++ b/playbooks/ome/application/ome_application_network_address_with_job_tracking.yml @@ -5,61 +5,58 @@ polling_interval: 5 # in seconds connection: local name: OME - Complete network settings with details tracking - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - - name: Complete network settings - ome_application_network_address: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" - ca_path: "/path/to/ca_cert.pem" - ipv4_configuration: - enable: true - enable_dhcp: false - static_ip_address: 192.168.0.2 - static_subnet_mask: 255.255.254.0 - static_gateway: 192.168.0.3 - use_dhcp_for_dns_server_names: false - static_preferred_dns_server: 192.168.0.4 - static_alternate_dns_server: 192.168.0.5 - ipv6_configuration: - enable: true - enable_auto_configuration: true - static_ip_address: 2626:f2f2:f081:9:1c1c:f1f1:4747:1 - static_prefix_length: 10 - static_gateway: 2626:f2f2:f081:9:1c1c:f1f1:4747:2 - use_dhcp_for_dns_server_names: true - static_preferred_dns_server: 2626:f2f2:f081:9:1c1c:f1f1:4747:3 - static_alternate_dns_server: 2626:f2f2:f081:9:1c1c:f1f1:4747:4 - dns_configuration: - register_with_dns: true - use_dhcp_for_dns_domain_name: false - dns_name: "MX-SVCTAG" - dns_domain_name: "localdomainname" - reboot_delay: 1 - register: facts_result + - name: Complete network settings + dellemc.openmanage.ome_application_network_address: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + ipv4_configuration: + enable: true + enable_dhcp: false + static_ip_address: 192.168.0.2 + static_subnet_mask: 255.255.254.0 + static_gateway: 192.168.0.3 + use_dhcp_for_dns_server_names: false + static_preferred_dns_server: 192.168.0.4 + static_alternate_dns_server: 192.168.0.5 + ipv6_configuration: + enable: true + enable_auto_configuration: true + static_ip_address: 2626:f2f2:f081:9:1c1c:f1f1:4747:1 + static_prefix_length: 10 + static_gateway: 2626:f2f2:f081:9:1c1c:f1f1:4747:2 + use_dhcp_for_dns_server_names: true + static_preferred_dns_server: 2626:f2f2:f081:9:1c1c:f1f1:4747:3 + static_alternate_dns_server: 2626:f2f2:f081:9:1c1c:f1f1:4747:4 + dns_configuration: + register_with_dns: true + use_dhcp_for_dns_domain_name: false + dns_name: "MX-SVCTAG" + dns_domain_name: "localdomainname" + reboot_delay: 1 + register: facts_result - # To end play when no job_info - - name: "End the play when no job_info" - meta: end_play - when: - - facts_result.changed == false - - "'job_info' not in facts_result" + # To end play when no job_info + - name: End the play when no job_info # noqa: no-handler + ansible.builtin.meta: end_play + when: + - not facts_result.changed + - "'job_info' not in facts_result" - - name: "Get job details using job id from network address config task." - ome_job_info: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - job_id: "{{ facts_result.job_info.Id }}" - register: job_result - failed_when: job_result.job_info.LastRunStatus.Name == 'Failed' - changed_when: job_result.job_info.LastRunStatus.Name == 'Completed' - until: job_result.job_info.LastRunStatus.Name == 'Completed' or job_result.job_info.LastRunStatus.Name == 'Failed' - retries: "{{ retries_count }}" - delay: "{{ polling_interval }}" + - name: Get job details using job id from network address config task. + dellemc.openmanage.ome_job_info: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + job_id: "{{ facts_result.job_info.Id }}" + register: job_result + failed_when: job_result.job_info.LastRunStatus.Name == 'Failed' + changed_when: job_result.job_info.LastRunStatus.Name == 'Completed' + until: job_result.job_info.LastRunStatus.Name == 'Completed' or job_result.job_info.LastRunStatus.Name == 'Failed' + retries: "{{ retries_count }}" + delay: "{{ polling_interval }}" diff --git a/playbooks/ome/application/ome_application_network_proxy.yml b/playbooks/ome/application/ome_application_network_proxy.yml index 0c0e8abf9..7fa80c505 100644 --- a/playbooks/ome/application/ome_application_network_proxy.yml +++ b/playbooks/ome/application/ome_application_network_proxy.yml @@ -2,17 +2,14 @@ - hosts: ome connection: local name: Dell OpenManage Ansible Application network proxy setting. - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - - name: Update proxy configuration and enable authentication. - ome_application_network_proxy: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + - name: Update proxy configuration and enable authentication. + dellemc.openmanage.ome_application_network_proxy: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" enable_proxy: true ip_address: "192.168.0.2" @@ -20,25 +17,25 @@ enable_authentication: true proxy_username: "root" proxy_password: "proxy_password" - tags: setting1 - - - name: Reset proxy authentication. - ome_application_network_proxy: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + tags: setting1 + + - name: Reset proxy authentication. + dellemc.openmanage.ome_application_network_proxy: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" enable_proxy: true ip_address: "192.168.0.2" proxy_port: 444 enable_authentication: false - tags: setting2 + tags: setting2 - - name: Reset proxy configuration. - ome_application_network_proxy: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + - name: Reset proxy configuration. + dellemc.openmanage.ome_application_network_proxy: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" enable_proxy: false - tags: setting3 + tags: setting3 diff --git a/playbooks/ome/application/ome_application_network_settings.yml b/playbooks/ome/application/ome_application_network_settings.yml index 68340ba9f..aa432790e 100644 --- a/playbooks/ome/application/ome_application_network_settings.yml +++ b/playbooks/ome/application/ome_application_network_settings.yml @@ -2,17 +2,14 @@ - hosts: ome connection: local name: Dell OpenManage Ansible Application network setting. - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - name: Configure universal inactivity timeout - ome_application_network_settings: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_application_network_settings: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" session_inactivity_timeout: enable_universal_timeout: true @@ -24,50 +21,50 @@ tags: - enable_universal_timeout - name: Configure API and GUI timeout and sessions - ome_application_network_settings: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" - ca_path: "/path/to/ca_cert.pem" - session_inactivity_timeout: - api_timeout: 20 - api_sessions: 100 - gui_timeout: 25 - gui_sessions: 5 + dellemc.openmanage.ome_application_network_settings: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + session_inactivity_timeout: + api_timeout: 20 + api_sessions: 100 + gui_timeout: 25 + gui_sessions: 5 tags: - enable_api_gui_timout_sessions - name: Configure timeout and sessions for all parameters - ome_application_network_settings: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" - ca_path: "/path/to/ca_cert.pem" - session_inactivity_timeout: - api_timeout: 20 - api_sessions: 100 - gui_timeout: 15 - gui_sessions: 5 - ssh_timeout: 30 - ssh_sessions: 2 - serial_timeout: 35 - serial_sessions: 1 + dellemc.openmanage.ome_application_network_settings: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + session_inactivity_timeout: + api_timeout: 20 + api_sessions: 100 + gui_timeout: 15 + gui_sessions: 5 + ssh_timeout: 30 + ssh_sessions: 2 + serial_timeout: 35 + serial_sessions: 1 tags: - enable_all_timeout_sessions - name: Disable universal timeout and configure timeout and sessions for other parameters - ome_application_network_settings: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" - ca_path: "/path/to/ca_cert.pem" - session_inactivity_timeout: - enable_universal_timeout: false - api_timeout: 20 - api_sessions: 100 - gui_timeout: 15 - gui_sessions: 5 - ssh_timeout: 30 - ssh_sessions: 2 - serial_timeout: 35 - serial_sessions: 1 + dellemc.openmanage.ome_application_network_settings: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + session_inactivity_timeout: + enable_universal_timeout: false + api_timeout: 20 + api_sessions: 100 + gui_timeout: 15 + gui_sessions: 5 + ssh_timeout: 30 + ssh_sessions: 2 + serial_timeout: 35 + serial_sessions: 1 tags: - - disa_all_timeout_sessions \ No newline at end of file + - disa_all_timeout_sessions diff --git a/playbooks/ome/application/ome_application_network_time.yml b/playbooks/ome/application/ome_application_network_time.yml index 7dd4edade..198cc759a 100644 --- a/playbooks/ome/application/ome_application_network_time.yml +++ b/playbooks/ome/application/ome_application_network_time.yml @@ -2,32 +2,29 @@ - hosts: ome connection: local name: Dell OpenManage Ansible Application network time setting. - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - - name: Configure system time. - ome_application_network_time: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + - name: Configure system time. + dellemc.openmanage.ome_application_network_time: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" enable_ntp: false system_time: "2020-03-31 21:35:18" time_zone: "TZ_ID_11" - tags: time_setting1 - - - name: Configure NTP server for time synchronization. - ome_application_network_time: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + tags: time_setting1 + + - name: Configure NTP server for time synchronization. + dellemc.openmanage.ome_application_network_time: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" time_zone: "TZ_ID_66" enable_ntp: true primary_ntp_address: "192.168.0.2" secondary_ntp_address1: "192.168.0.3" secondary_ntp_address2: "192.168.0.4" - tags: time_setting2 + tags: time_setting2 diff --git a/playbooks/ome/application/ome_application_network_time_zone_info.yml b/playbooks/ome/application/ome_application_network_time_zone_info.yml index a57e0b905..39f96ffe0 100644 --- a/playbooks/ome/application/ome_application_network_time_zone_info.yml +++ b/playbooks/ome/application/ome_application_network_time_zone_info.yml @@ -6,26 +6,23 @@ vars: time_zone_uri: "/api/ApplicationService/Network/TimeZones" - collections: - - dellemc.openmanage - tasks: - name: "Get list of all available times zones along with information specific to each time zone." - uri: + ansible.builtin.uri: url: "https://{{ baseuri }}{{ time_zone_uri }}" user: "{{ username }}" password: "{{ password }}" method: "GET" - use_proxy: yes + use_proxy: true status_code: 200 - validate_certs: no - force_basic_auth: yes + validate_certs: false + force_basic_auth: true register: time_zone_result failed_when: "'value' not in time_zone_result.json" - + - name: Get specific time zone ID using time zone name with_items: - "{{ time_zone_result.json.value }}" - debug: - msg: "{{item['Id']}}" - when: item['Name']=='(GMT+05:30) Sri Jayawardenepura' + ansible.builtin.debug: + msg: "{{ item['Id'] }}" + when: item['Name'] == '(GMT+05:30) Sri Jayawardenepura' diff --git a/playbooks/ome/application/ome_application_network_webserver.yml b/playbooks/ome/application/ome_application_network_webserver.yml index e445ed849..4049b87c1 100644 --- a/playbooks/ome/application/ome_application_network_webserver.yml +++ b/playbooks/ome/application/ome_application_network_webserver.yml @@ -2,39 +2,36 @@ - hosts: ome connection: local name: Dell OME Application network webserver settings. - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - - name: Update webserver port and session time out configuration. - ome_application_network_webserver: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - webserver_port: 443 - webserver_timeout: 10 - tags: - - port_timeout_update + - name: Update webserver port and session time out configuration. + dellemc.openmanage.ome_application_network_webserver: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + webserver_port: 443 + webserver_timeout: 10 + tags: + - port_timeout_update - - name: Update session time out - ome_application_network_webserver: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - webserver_timeout: 30 - tags: - - timeout_update + - name: Update session time out + dellemc.openmanage.ome_application_network_webserver: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + webserver_timeout: 30 + tags: + - timeout_update - - name: Update web server port. - ome_application_network_webserver: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - webserver_port: 8443 - tags: - - port_update \ No newline at end of file + - name: Update web server port. + dellemc.openmanage.ome_application_network_webserver: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + webserver_port: 8443 + tags: + - port_update diff --git a/playbooks/ome/application/ome_application_network_webserver_port_changed_tracking.yml b/playbooks/ome/application/ome_application_network_webserver_port_changed_tracking.yml index 28911b801..2d2b85c09 100644 --- a/playbooks/ome/application/ome_application_network_webserver_port_changed_tracking.yml +++ b/playbooks/ome/application/ome_application_network_webserver_port_changed_tracking.yml @@ -1,61 +1,56 @@ --- - hosts: ome connection: local - name: "Dell OME Application network webserver port change and track web - server till the service restarts." - gather_facts: False + name: Dell OME Application network webserver port change and track webserver till the service restarts. + gather_facts: false vars: # 5 minutes wait max retries_count: 30 polling_interval: 10 webserver_uri: "/api/ApplicationService/Network/WebServerConfiguration" - collections: - - dellemc.openmanage - tasks: - # Update web server configuration - - name: Update webserver port and timeout of OME - ome_application_network_webserver: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" - ca_path: "/path/to/ca_cert.pem" - port: "{{ ome_webserver_port }}" - webserver_port: "{{ new_port }}" - webserver_timeout: 21 - register: result + # Update web server configuration + - name: Update webserver port and timeout of OME + dellemc.openmanage.ome_application_network_webserver: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + port: "{{ ome_webserver_port }}" + webserver_port: "{{ new_port }}" + webserver_timeout: 21 + register: result - # To end play when no port change or failure - - name: "End the play when no port change" - meta: end_play - when: - - result.changed == false - - "'webserver_configuration' not in result" + # To end play when no port change or failure + - name: End the play when no port change # noqa: no-handler + ansible.builtin.meta: end_play + when: + - not result.changed + - "'webserver_configuration' not in result" - # Loop till OME webserver is active by using the new port and webserver config GET call - - name: "Pause play until webserver URL is reachable from this host with new port" - uri: - url: "https://{{ hostname }}:{{ result.webserver_configuration.PortNumber - }}{{ webserver_uri }}" - user: "{{ username }}" - password: "{{ password }}" - method: "GET" - use_proxy: yes - return_content: yes - validate_certs: no - force_basic_auth: yes - headers: - Content-Type: "application/json" - Accept: "application/json" - register: webport_result - until: "'PortNumber' in webport_result or webport_result.status == 200" - retries: "{{ retries_count }}" - delay: "{{ polling_interval }}" + # Loop till OME webserver is active by using the new port and webserver config GET call + - name: Pause play until webserver URL is reachable from this host with new port + ansible.builtin.uri: + url: "https://{{ hostname }}:{{ result.webserver_configuration.PortNumber }}{{ webserver_uri }}" + user: "{{ username }}" + password: "{{ password }}" + method: "GET" + use_proxy: true + return_content: true + validate_certs: false + force_basic_auth: true + headers: + Content-Type: "application/json" + Accept: "application/json" + register: webport_result + until: "'PortNumber' in webport_result or webport_result.status == 200" + retries: "{{ retries_count }}" + delay: "{{ polling_interval }}" - # Output the webserver_configuration values to be used further - - name: "Output the webserver config" - vars: - webserver_configuration: "{{ webport_result.json }}" - debug: - var: webserver_configuration \ No newline at end of file + # Output the webserver_configuration values to be used further + - name: "Output the webserver config" + vars: + webserver_configuration: "{{ webport_result.json }}" + ansible.builtin.debug: + var: webserver_configuration diff --git a/playbooks/ome/application/ome_application_security_settings.yml b/playbooks/ome/application/ome_application_security_settings.yml index 6a259e961..eee343b68 100644 --- a/playbooks/ome/application/ome_application_security_settings.yml +++ b/playbooks/ome/application/ome_application_security_settings.yml @@ -2,56 +2,53 @@ - hosts: ome connection: local name: Configure login security settings - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - - name: Configure restricted allowed IP range - ome_application_security_settings: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - restrict_allowed_ip_range: - enable_ip_range: true - ip_range: 192.1.2.3/24 + - name: Configure restricted allowed IP range + dellemc.openmanage.ome_application_security_settings: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + restrict_allowed_ip_range: + enable_ip_range: true + ip_range: 192.1.2.3/24 - - name: Configure login lockout policy - ome_application_security_settings: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - login_lockout_policy: - by_user_name: true - by_ip_address: true - lockout_fail_count: 3 - lockout_fail_window: 30 - lockout_penalty_time: 900 + - name: Configure login lockout policy + dellemc.openmanage.ome_application_security_settings: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + login_lockout_policy: + by_user_name: true + by_ip_address: true + lockout_fail_count: 3 + lockout_fail_window: 30 + lockout_penalty_time: 900 - - name: Configure restricted allowed IP range and login lockout policy with job wait time out of 60 seconds - ome_application_security_settings: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - restrict_allowed_ip_range: - enable_ip_range: true - ip_range: 192.1.2.3/24 - login_lockout_policy: - by_user_name: true - by_ip_address: true - lockout_fail_count: 3 - lockout_fail_window: 30 - lockout_penalty_time: 900 - job_wait_timeout: 60 + - name: Configure restricted allowed IP range and login lockout policy with job wait time out of 60 seconds + dellemc.openmanage.ome_application_security_settings: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + restrict_allowed_ip_range: + enable_ip_range: true + ip_range: 192.1.2.3/24 + login_lockout_policy: + by_user_name: true + by_ip_address: true + lockout_fail_count: 3 + lockout_fail_window: 30 + lockout_penalty_time: 900 + job_wait_timeout: 60 - - name: Enable FIPS mode - ome_application_security_settings: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - fips_mode_enable: yes + - name: Enable FIPS mode + dellemc.openmanage.ome_application_security_settings: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + fips_mode_enable: true diff --git a/playbooks/ome/compliance/ome_configuration_compliance_baseline.yml b/playbooks/ome/compliance/ome_configuration_compliance_baseline.yml index 6248ad433..c3d19e410 100644 --- a/playbooks/ome/compliance/ome_configuration_compliance_baseline.yml +++ b/playbooks/ome/compliance/ome_configuration_compliance_baseline.yml @@ -2,17 +2,14 @@ - hosts: ome connection: local name: Dell OpenManage Ansible configuration compliance baseline. - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - name: Create a configuration compliance baseline using device IDs - ome_configuration_compliance_baseline: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_configuration_compliance_baseline: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" command: create template_name: "template 1" @@ -25,10 +22,10 @@ - create_compliance_baseline_device_id - name: Create a configuration compliance baseline using device service tags - ome_configuration_compliance_baseline: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_configuration_compliance_baseline: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" command: create template_name: "template 1" @@ -41,10 +38,10 @@ - create_compliance_baseline_tags - name: Create a configuration compliance baseline using group names - ome_configuration_compliance_baseline: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_configuration_compliance_baseline: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" command: create template_name: "template 1" @@ -58,10 +55,10 @@ - create_compliance_baseline_group_id - name: Delete the configuration compliance baselines - ome_configuration_compliance_baseline: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_configuration_compliance_baseline: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" command: delete names: @@ -71,7 +68,7 @@ - delete_compliance_baseline - name: Modify a configuration compliance baseline using group names - ome_configuration_compliance_baseline: + dellemc.openmanage.ome_configuration_compliance_baseline: hostname: "192.168.0.1" username: "username" password: "password" @@ -85,7 +82,7 @@ - Group1 - name: Remediate specific non-compliant devices to a configuration compliance baseline using device IDs - ome_configuration_compliance_baseline: + dellemc.openmanage.ome_configuration_compliance_baseline: hostname: "192.168.0.1" username: "username" password: "password" @@ -96,7 +93,7 @@ - 1111 - name: Remediate specific non-compliant devices to a configuration compliance baseline using device service tags - ome_configuration_compliance_baseline: + dellemc.openmanage.ome_configuration_compliance_baseline: hostname: "192.168.0.1" username: "username" password: "password" @@ -109,11 +106,11 @@ - "SVCTAG2" - name: Remediate all the non-compliant devices to a configuration compliance baseline - ome_configuration_compliance_baseline: + dellemc.openmanage.ome_configuration_compliance_baseline: hostname: "192.168.0.1" username: "username" password: "password" ca_path: "/path/to/ca_cert.pem" command: "remediate" job_wait_timeout: 2000 - names: "baseline1" \ No newline at end of file + names: "baseline1" diff --git a/playbooks/ome/compliance/ome_configuration_compliance_baseline_workflow.yml b/playbooks/ome/compliance/ome_configuration_compliance_baseline_workflow.yml index bd7fab1e2..4fa4e34ff 100644 --- a/playbooks/ome/compliance/ome_configuration_compliance_baseline_workflow.yml +++ b/playbooks/ome/compliance/ome_configuration_compliance_baseline_workflow.yml @@ -2,15 +2,11 @@ - hosts: ome connection: local name: Dell OpenManage Ansible configuration compliance baseline workflow. - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - - name: Create a configuration compliance baseline using group names - ome_configuration_compliance_baseline: + dellemc.openmanage.ome_configuration_compliance_baseline: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" @@ -25,7 +21,7 @@ - "Group2" - name: Retrieve the compliance report of all of the devices in the specified configuration compliance baseline. - ome_configuration_compliance_info: + dellemc.openmanage.ome_configuration_compliance_info: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" @@ -38,10 +34,12 @@ # and next task device_ids attribute replaced with device_service_tag. - name: Filter the non compliant device based on the retrieved compliance report. ansible.builtin.set_fact: - non_compliance_devices: "{{ compliance_report.compliance_info | json_query(\"value[?ComplianceStatus=='NONCOMPLIANT']\") | map(attribute='Id') | list }}" + non_compliance_devices: "{{ compliance_report.compliance_info | json_query(jquery | default('')) | map(attribute=''Id'') | list }}" + vars: + jquery: 'value[?ComplianceStatus==''NONCOMPLIANT'']' - - name: Remediate a specified non-complaint devices to a configuration compliance baseline using device IDs - ome_configuration_compliance_baseline: + - name: Remediate a specified non-complaint devices to a configuration compliance baseline using device IDs # noqa: args[module] + dellemc.openmanage.ome_configuration_compliance_baseline: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" @@ -49,4 +47,4 @@ command: "remediate" names: "baseline1" device_ids: "{{ non_compliance_devices }}" - when: "non_compliance_devices|length>0" + when: "non_compliance_devices | length > 0" diff --git a/playbooks/ome/compliance/ome_configuration_compliance_info.yml b/playbooks/ome/compliance/ome_configuration_compliance_info.yml index a24557030..4ee9f5c81 100644 --- a/playbooks/ome/compliance/ome_configuration_compliance_info.yml +++ b/playbooks/ome/compliance/ome_configuration_compliance_info.yml @@ -2,34 +2,31 @@ - hosts: ome connection: local name: Dell OpenManage Ansible Module for Device compliance information - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - - name: Retrieve the compliance report of all of the devices in the specified configuration compliance baseline. - ome_configuration_compliance_info: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - baseline: baseline_name + - name: Retrieve the compliance report of all of the devices in the specified configuration compliance baseline. + dellemc.openmanage.ome_configuration_compliance_info: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + baseline: baseline_name - - name: Retrieve the compliance report for a specific device associated with the baseline using the device ID. - ome_configuration_compliance_info: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - baseline: baseline_name - device_id: 10001 + - name: Retrieve the compliance report for a specific device associated with the baseline using the device ID. + dellemc.openmanage.ome_configuration_compliance_info: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + baseline: baseline_name + device_id: 10001 - - name: Retrieve the compliance report for a specific device associated with the baseline using the device service tag. - ome_configuration_compliance_info: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - baseline: baseline_name - device_service_tag: 2HFGH3 + - name: Retrieve the compliance report for a specific device associated with the baseline using the device service tag. + dellemc.openmanage.ome_configuration_compliance_info: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + baseline: baseline_name + device_service_tag: 2HFGH3 diff --git a/playbooks/ome/firmware/baseline/component_reports_filtering/component_complaince_report_with_baseline.yml b/playbooks/ome/firmware/baseline/component_reports_filtering/component_complaince_report_with_baseline.yml index 48259af68..4aaae7568 100644 --- a/playbooks/ome/firmware/baseline/component_reports_filtering/component_complaince_report_with_baseline.yml +++ b/playbooks/ome/firmware/baseline/component_reports_filtering/component_complaince_report_with_baseline.yml @@ -2,25 +2,21 @@ - hosts: ome connection: local gather_facts: false - name: "OME - Ansible Modules" - - collections: - - dellemc.openmanage + name: OME - Ansible Modules tasks: + - name: "Retrieve baseline information for specific baseline." + dellemc.openmanage.ome_firmware_baseline_compliance_info: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + baseline_name: "baseline_name" + register: result - - name: "Retrieve baseline information for specific baseline." - ome_firmware_baseline_compliance_info: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - baseline_name: "baseline_name" - register: result - - - name: "Filter out device compliance reports." - loop: "{{ result.baseline_compliance_info }}" - debug: - msg: "{{item.ComponentComplianceReports}}" - loop_control: - label: "{{ item.DeviceId }}" \ No newline at end of file + - name: Filter out device compliance reports. + loop: "{{ result.baseline_compliance_info }}" + ansible.builtin.debug: + msg: "{{ item.ComponentComplianceReports }}" + loop_control: + label: "{{ item.DeviceId }}" diff --git a/playbooks/ome/firmware/baseline/component_reports_filtering/component_complaince_report_with_devices.yml b/playbooks/ome/firmware/baseline/component_reports_filtering/component_complaince_report_with_devices.yml index 77d4eddf4..8df1b8201 100644 --- a/playbooks/ome/firmware/baseline/component_reports_filtering/component_complaince_report_with_devices.yml +++ b/playbooks/ome/firmware/baseline/component_reports_filtering/component_complaince_report_with_devices.yml @@ -4,25 +4,21 @@ gather_facts: false name: "OME - Ansible Modules" - collections: - - dellemc.openmanage - tasks: + - name: Retrieve baseline information for specified devices. + dellemc.openmanage.ome_firmware_baseline_compliance_info: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + device_ids: + - 11111 + - 22222 + register: result - - name: "Retrieve baseline information for specified devices." - ome_firmware_baseline_compliance_info: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - device_ids: - - 11111 - - 22222 - register: result - - - name: "Filter out device compliance reports." - debug: - msg: "{{ item.DeviceComplianceReports.0.ComponentComplianceReports }}" - loop: "{{ result.baseline_compliance_info }}" - loop_control: - label: "{{ item.Name }}" \ No newline at end of file + - name: Filter out device compliance reports. + ansible.builtin.debug: + msg: "{{ item.DeviceComplianceReports.0.ComponentComplianceReports }}" + loop: "{{ result.baseline_compliance_info }}" + loop_control: + label: "{{ item.Name }}" diff --git a/playbooks/ome/firmware/baseline/ome_firmware_baseline.yml b/playbooks/ome/firmware/baseline/ome_firmware_baseline.yml index 35f0eb234..a882fb82d 100644 --- a/playbooks/ome/firmware/baseline/ome_firmware_baseline.yml +++ b/playbooks/ome/firmware/baseline/ome_firmware_baseline.yml @@ -2,74 +2,71 @@ - hosts: ome connection: local name: Dell OpenManage Ansible OME firmware baseline operations. - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - - name: Create baseline for device IDs - ome_firmware_baseline: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" - ca_path: "/path/to/ca_cert.pem" - baseline_name: "baseline_name" - baseline_description: "baseline_description" - catalog_name: "catalog_name" - device_ids: - - 1010 - - 2020 + - name: Create baseline for device IDs + dellemc.openmanage.ome_firmware_baseline: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + baseline_name: "baseline_name" + baseline_description: "baseline_description" + catalog_name: "catalog_name" + device_ids: + - 1010 + - 2020 - - name: Create baseline for servicetags - ome_firmware_baseline: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" - ca_path: "/path/to/ca_cert.pem" - baseline_name: "baseline_name" - baseline_description: "baseline_description" - catalog_name: "catalog_name" - device_service_tags: - - "SVCTAG1" - - "SVCTAG2" + - name: Create baseline for servicetags + dellemc.openmanage.ome_firmware_baseline: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + baseline_name: "baseline_name" + baseline_description: "baseline_description" + catalog_name: "catalog_name" + device_service_tags: + - "SVCTAG1" + - "SVCTAG2" - - name: create baseline for device groups without job_tracking - ome_firmware_baseline: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" - ca_path: "/path/to/ca_cert.pem" - baseline_name: "baseline_name" - baseline_description: "baseline_description" - catalog_name: "catalog_name" - device_group_names: - - "Group1" - - "Group2" - job_wait: no + - name: Create baseline for device groups without job_tracking + dellemc.openmanage.ome_firmware_baseline: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + baseline_name: "baseline_name" + baseline_description: "baseline_description" + catalog_name: "catalog_name" + device_group_names: + - "Group1" + - "Group2" + job_wait: false - - name: Modify an existing baseline - ome_firmware_baseline: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" - ca_path: "/path/to/ca_cert.pem" - baseline_name: "existing_baseline_name" - new_baseline_name: "new_baseline_name" - baseline_description: "new baseline_description" - catalog_name: "catalog_other" - device_group_names: - - "Group3" - - "Group4" - - "Group5" - downgrade_enabled: no - is_64_bit: yes + - name: Modify an existing baseline + dellemc.openmanage.ome_firmware_baseline: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + baseline_name: "existing_baseline_name" + new_baseline_name: "new_baseline_name" + baseline_description: "new baseline_description" + catalog_name: "catalog_other" + device_group_names: + - "Group3" + - "Group4" + - "Group5" + downgrade_enabled: false + is_64_bit: true - - name: Delete a baseline - ome_firmware_baseline: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" - ca_path: "/path/to/ca_cert.pem" - state: absent - baseline_name: "baseline_name" \ No newline at end of file + - name: Delete a baseline + dellemc.openmanage.ome_firmware_baseline: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + state: absent + baseline_name: "baseline_name" diff --git a/playbooks/ome/firmware/baseline/ome_firmware_baseline_compliance_info.yml b/playbooks/ome/firmware/baseline/ome_firmware_baseline_compliance_info.yml index cb42e1740..b78fdbd09 100644 --- a/playbooks/ome/firmware/baseline/ome_firmware_baseline_compliance_info.yml +++ b/playbooks/ome/firmware/baseline/ome_firmware_baseline_compliance_info.yml @@ -2,50 +2,47 @@ - hosts: ome connection: local name: Dell OpenManage Ansible template inventory details. - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - name: Retrieves device based compliance report for specified device IDs.. - ome_firmware_baseline_compliance_info: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_firmware_baseline_compliance_info: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" device_ids: - - 11111 - - 22222 + - 11111 + - 22222 tags: device_ids - name: Retrieves device based compliance report for specified service Tags. - ome_firmware_baseline_compliance_info: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_firmware_baseline_compliance_info: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" device_service_tags: - - MXL1234 - - MXL4567 + - MXL1234 + - MXL4567 tags: device_service_tags - name: Retrieves device based compliance report for specified group names. - ome_firmware_baseline_compliance_info: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_firmware_baseline_compliance_info: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" device_group_names: - - group1 - - group2 + - group1 + - group2 tags: device_group_names - name: Retrieves device compliance report for a specified baseline. - ome_firmware_baseline_compliance_info: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_firmware_baseline_compliance_info: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" baseline_name: "baseline_name" - tags: baseline_device \ No newline at end of file + tags: baseline_device diff --git a/playbooks/ome/firmware/baseline/ome_firmware_baseline_compliance_info_filters.yml b/playbooks/ome/firmware/baseline/ome_firmware_baseline_compliance_info_filters.yml index bbbf5f0d2..5dc46d267 100644 --- a/playbooks/ome/firmware/baseline/ome_firmware_baseline_compliance_info_filters.yml +++ b/playbooks/ome/firmware/baseline/ome_firmware_baseline_compliance_info_filters.yml @@ -4,60 +4,56 @@ gather_facts: false name: "OME - Ansible Modules" - collections: - - dellemc.openmanage - tasks: - - - name: "Retrieve baseline information for specific device ids." - ome_firmware_baseline_compliance_info: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - device_ids: - - 11111 - - 11112 - register: result - - tags: - - overall-compliance-report - - - name: "Firmware baseline compliance info based on FirmwareStatus - Non-Compliant" - set_fact: - non_compliance_fact: "{{ item }}" - when: - - item.DeviceComplianceReports.0.FirmwareStatus=='Non-Compliant' - with_items: - - "{{ result.baseline_compliance_info }}" - loop_control: - label: "{{ item.Name }} - {{ item.DeviceComplianceReports.0.FirmwareStatus }}" - - tags: - - non-compliance-report - - - name: "Firmware baseline compliance info based on Device ID" - set_fact: - device_fact: "{{ item }}" - when: - - item.DeviceComplianceReports.0.DeviceId==11111 - with_items: - - "{{ result.baseline_compliance_info }}" - loop_control: - label: "{{ item.Name }} - {{ item.DeviceComplianceReports.0.DeviceId }}" - - tags: - - device-id-report - - - name: "Firmware baseline compliance info based on Device Service Tag" - set_fact: - service_tag_fact: "{{ item }}" - when: - - item.DeviceComplianceReports.0.ServiceTag=='1X1X1' - with_items: - - "{{ result.baseline_compliance_info }}" - loop_control: - label: "{{ item.Name }} - {{ item.DeviceComplianceReports.0.ServiceTag }}" - - tags: - - device-service-tag-report \ No newline at end of file + - name: Retrieve baseline information for specific device ids. + dellemc.openmanage.ome_firmware_baseline_compliance_info: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + device_ids: + - 11111 + - 11112 + register: result + + tags: + - overall-compliance-report + + - name: Firmware baseline compliance info based on FirmwareStatus - Non-Compliant + ansible.builtin.set_fact: + non_compliance_fact: "{{ item }}" + when: + - item.DeviceComplianceReports.0.FirmwareStatus=='Non-Compliant' + with_items: + - "{{ result.baseline_compliance_info }}" + loop_control: + label: "{{ item.Name }} - {{ item.DeviceComplianceReports.0.FirmwareStatus }}" + + tags: + - non-compliance-report + + - name: Firmware baseline compliance info based on Device ID + ansible.builtin.set_fact: + device_fact: "{{ item }}" + when: + - item.DeviceComplianceReports.0.DeviceId==11111 + with_items: + - "{{ result.baseline_compliance_info }}" + loop_control: + label: "{{ item.Name }} - {{ item.DeviceComplianceReports.0.DeviceId }}" + + tags: + - device-id-report + + - name: Firmware baseline compliance info based on Device Service Tag + ansible.builtin.set_fact: + service_tag_fact: "{{ item }}" + when: + - item.DeviceComplianceReports.0.ServiceTag=='1X1X1' + with_items: + - "{{ result.baseline_compliance_info }}" + loop_control: + label: "{{ item.Name }} - {{ item.DeviceComplianceReports.0.ServiceTag }}" + + tags: + - device-service-tag-report diff --git a/playbooks/ome/firmware/baseline/ome_firmware_baseline_info.yml b/playbooks/ome/firmware/baseline/ome_firmware_baseline_info.yml index 7993db51e..70e40fea8 100644 --- a/playbooks/ome/firmware/baseline/ome_firmware_baseline_info.yml +++ b/playbooks/ome/firmware/baseline/ome_firmware_baseline_info.yml @@ -2,25 +2,22 @@ - hosts: ome connection: local name: Dell OpenManage Ansible firmware baseline details. - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - name: Retrieve details of all the available firmware baselines. - ome_firmware_baseline_info: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_firmware_baseline_info: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" tags: firmware_baselines - - name: Retrieve details of a specific firmware baseline identified by its baseline name. - ome_firmware_baseline_info: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + - name: Retrieve details of a specific firmware baseline identified by its baseline name. + dellemc.openmanage.ome_firmware_baseline_info: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" baseline_name: "baseline_name" - tags: firmware_baseline \ No newline at end of file + tags: firmware_baseline diff --git a/playbooks/ome/firmware/catalog/ome_firmware_catalog.yml b/playbooks/ome/firmware/catalog/ome_firmware_catalog.yml index a065a3c0c..cc2ceee40 100644 --- a/playbooks/ome/firmware/catalog/ome_firmware_catalog.yml +++ b/playbooks/ome/firmware/catalog/ome_firmware_catalog.yml @@ -2,120 +2,117 @@ - hosts: ome connection: local name: "OME - Create Catalog using Repository." - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - - name: Create a catalog from HTTPS repository - ome_firmware_catalog: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - catalog_name: catalog1 - catalog_description: catalog description - source: downloads.company.com - repository_type: HTTPS - source_path: "catalog" - file_name: "catalog.gz" - check_certificate: True - - - name: Create a catalog from HTTP repository - ome_firmware_catalog: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - catalog_name: "{{ catalog_name }}" - catalog_description: catalog description - source: downloads.company.com - repository_type: HTTP - source_path: "catalog" - file_name: "catalog.gz" + - name: Create a catalog from HTTPS repository + dellemc.openmanage.ome_firmware_catalog: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + catalog_name: catalog1 + catalog_description: catalog description + source: downloads.company.com + repository_type: HTTPS + source_path: "catalog" + file_name: "catalog.gz" + check_certificate: true + + - name: Create a catalog from HTTP repository + dellemc.openmanage.ome_firmware_catalog: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + catalog_name: "{{ catalog_name }}" + catalog_description: catalog description + source: downloads.company.com + repository_type: HTTP + source_path: "catalog" + file_name: "catalog.gz" + + - name: Create a catalog using CIFS share + dellemc.openmanage.ome_firmware_catalog: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + catalog_name: "{{ catalog_name }}" + catalog_description: catalog description + source: "192.166.0.1" + repository_type: CIFS + source_path: "cifs/R940" + file_name: "catalog.gz" + repository_username: "{{ repository_username }}" + repository_password: "{{ repository_password }}" + repository_domain: "{{ repository_domain }}" - - name: Create a catalog using CIFS share - ome_firmware_catalog: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - catalog_name: "{{ catalog_name }}" - catalog_description: catalog description - source: "192.166.0.1" - repository_type: CIFS - source_path: "cifs/R940" - file_name: "catalog.gz" - repository_username: "{{ repository_username }}" - repository_password: "{{ repository_password }}" - repository_domain: "{{ repository_domain }}" - - - name: Create a catalog using NFS share - ome_firmware_catalog: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - catalog_name: "{{ catalog_name }}" - catalog_description: catalog description - source: "192.166.0.2" - repository_type: NFS - source_path: "/nfs/R940" - file_name: "catalog.xml" + - name: Create a catalog using NFS share + dellemc.openmanage.ome_firmware_catalog: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + catalog_name: "{{ catalog_name }}" + catalog_description: catalog description + source: "192.166.0.2" + repository_type: NFS + source_path: "/nfs/R940" + file_name: "catalog.xml" - - name: Create a catalog using repository from Dell.com - ome_firmware_catalog: - hostname: "192.168.0.1" - username: "username" - password: "password" - ca_path: "/path/to/ca_cert.pem" - catalog_name: "catalog_name" - catalog_description: "catalog_description" - repository_type: "DELL_ONLINE" - check_certificate: True + - name: Create a catalog using repository from Dell.com + dellemc.openmanage.ome_firmware_catalog: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + catalog_name: "catalog_name" + catalog_description: "catalog_description" + repository_type: "DELL_ONLINE" + check_certificate: true - - name: Modify a catalog using a repository from CIFS share - ome_firmware_catalog: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - catalog_name: "{{ catalog_name }}" - catalog_description: new catalog description - source: "192.166.0.2" - repository_type: CIFS - source_path: "cifs/R941" - file_name: "catalog1.gz" - repository_username: "{{ repository_username }}" - repository_password: "{{ repository_password }}" - repository_domain: "{{ repository_domain }}" + - name: Modify a catalog using a repository from CIFS share + dellemc.openmanage.ome_firmware_catalog: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + catalog_name: "{{ catalog_name }}" + catalog_description: new catalog description + source: "192.166.0.2" + repository_type: CIFS + source_path: "cifs/R941" + file_name: "catalog1.gz" + repository_username: "{{ repository_username }}" + repository_password: "{{ repository_password }}" + repository_domain: "{{ repository_domain }}" - - name: Modify a catalog using a repository from Dell.com - ome_firmware_catalog: - hostname: "192.168.0.1" - username: "username" - password: "password" - ca_path: "/path/to/ca_cert.pem" - catalog_id: 10 - repository_type: DELL_ONLINE - new_catalog_name: "new_catalog_name" - catalog_description: "new_catalog_description" + - name: Modify a catalog using a repository from Dell.com + dellemc.openmanage.ome_firmware_catalog: + hostname: "192.168.0.1" + username: "username" + password: "password" + ca_path: "/path/to/ca_cert.pem" + catalog_id: 10 + repository_type: DELL_ONLINE + new_catalog_name: "new_catalog_name" + catalog_description: "new_catalog_description" - - name: Delete catalog using catalog name - ome_firmware_catalog: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - state: absent - catalog_name: ["catalog_name1", "catalog_name2"] + - name: Delete catalog using catalog name + dellemc.openmanage.ome_firmware_catalog: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + state: absent + catalog_name: ["catalog_name1", "catalog_name2"] - - name: Delete catalog using catalog id - ome_firmware_catalog: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - state: absent - catalog_id: [11, 34] \ No newline at end of file + - name: Delete catalog using catalog id + dellemc.openmanage.ome_firmware_catalog: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + state: absent + catalog_id: [11, 34] diff --git a/playbooks/ome/firmware/ome_firmware.yml b/playbooks/ome/firmware/ome_firmware.yml index 198e2cce9..de5637fca 100644 --- a/playbooks/ome/firmware/ome_firmware.yml +++ b/playbooks/ome/firmware/ome_firmware.yml @@ -2,141 +2,138 @@ - hosts: ome connection: local name: "OME - Update Firmware" - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - - name: Update firmware from a DUP file using a device ids - ome_firmware: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - device_id: - - 11111 - - 22222 - dup_file: "/path/Chassis-System-Management_Firmware_6N9WN_WN64_1.00.01_A00.EXE" + - name: Update firmware from a DUP file using a device ids + dellemc.openmanage.ome_firmware: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + device_id: + - 11111 + - 22222 + dup_file: "/path/Chassis-System-Management_Firmware_6N9WN_WN64_1.00.01_A00.EXE" - - name: Update firmware from a DUP file using a device service tags - ome_firmware: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - device_service_tag: - - KLBR111 - - KLBR222 - dup_file: "/path/Network_Firmware_NTRW0_WN64_14.07.07_A00-00_01.EXE" + - name: Update firmware from a DUP file using a device service tags + dellemc.openmanage.ome_firmware: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + device_service_tag: + - KLBR111 + - KLBR222 + dup_file: "/path/Network_Firmware_NTRW0_WN64_14.07.07_A00-00_01.EXE" - - name: Update firmware from a DUP file using a device group names - ome_firmware: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - device_group_names: - - servers - dup_file: "/path/BIOS_87V69_WN64_2.4.7.EXE" + - name: Update firmware from a DUP file using a device group names + dellemc.openmanage.ome_firmware: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + device_group_names: + - servers + dup_file: "/path/BIOS_87V69_WN64_2.4.7.EXE" - - name: Update firmware using baseline name - ome_firmware: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - baseline_name: baseline_devices + - name: Update firmware using baseline name + dellemc.openmanage.ome_firmware: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + baseline_name: baseline_devices - - name: Stage firmware for the next reboot using baseline name - ome_firmware: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - baseline_name: baseline_devices - schedule: StageForNextReboot + - name: Stage firmware for the next reboot using baseline name + dellemc.openmanage.ome_firmware: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + baseline_name: baseline_devices + schedule: StageForNextReboot - - name: Update firmware using baseline name and components - ome_firmware: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - baseline_name: baseline_devices - components: - - BIOS + - name: Update firmware using baseline name and components + dellemc.openmanage.ome_firmware: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + baseline_name: baseline_devices + components: + - BIOS - - name: Update firmware of device components from a DUP file using a device ids in a baseline - ome_firmware: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - baseline_name: baseline_devices - device_id: - - 11111 - - 22222 - components: - - iDRAC with Lifecycle Controller + - name: Update firmware of device components from a DUP file using a device ids in a baseline + dellemc.openmanage.ome_firmware: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + baseline_name: baseline_devices + device_id: + - 11111 + - 22222 + components: + - iDRAC with Lifecycle Controller - - name: Update firmware of device components from a baseline using a device service tags under a baseline - ome_firmware: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - baseline_name: baseline_devices - device_service_tag: - - KLBR111 - - KLBR222 - components: - - IOM-SAS + - name: Update firmware of device components from a baseline using a device service tags under a baseline + dellemc.openmanage.ome_firmware: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + baseline_name: baseline_devices + device_service_tag: + - KLBR111 + - KLBR222 + components: + - IOM-SAS - - name: Update firmware using baseline name with a device id and required components - ome_firmware: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - baseline_name: baseline_devices - devices: - - id: 12345 - components: - - Lifecycle Controller - - id: 12346 - components: - - Enterprise UEFI Diagnostics - - BIOS + - name: Update firmware using baseline name with a device id and required components + dellemc.openmanage.ome_firmware: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + baseline_name: baseline_devices + devices: + - id: 12345 + components: + - Lifecycle Controller + - id: 12346 + components: + - Enterprise UEFI Diagnostics + - BIOS - - name: Update firmware using baseline name with a device service tag and required components - ome_firmware: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - baseline_name: baseline_devices - devices: - - service_tag: ABCDE12 - components: - - PERC H740P Adapter - - BIOS - - service_tag: GHIJK34 - components: - - OS Drivers Pack + - name: Update firmware using baseline name with a device service tag and required components + dellemc.openmanage.ome_firmware: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + baseline_name: baseline_devices + devices: + - service_tag: ABCDE12 + components: + - PERC H740P Adapter + - BIOS + - service_tag: GHIJK34 + components: + - OS Drivers Pack - - name: Update firmware using baseline name with a device service tag or device id and required components - ome_firmware: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - baseline_name: baseline_devices - devices: - - service_tag: ABCDE12 - components: - - BOSS-S1 Adapter - - PowerEdge Server BIOS - - id: 12345 - components: - - iDRAC with Lifecycle Controller + - name: Update firmware using baseline name with a device service tag or device id and required components + dellemc.openmanage.ome_firmware: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + baseline_name: baseline_devices + devices: + - service_tag: ABCDE12 + components: + - BOSS-S1 Adapter + - PowerEdge Server BIOS + - id: 12345 + components: + - iDRAC with Lifecycle Controller diff --git a/playbooks/ome/firmware/ome_firmware_with_job_tracking.yml b/playbooks/ome/firmware/ome_firmware_with_job_tracking.yml index c104f3f5b..d254476b1 100644 --- a/playbooks/ome/firmware/ome_firmware_with_job_tracking.yml +++ b/playbooks/ome/firmware/ome_firmware_with_job_tracking.yml @@ -2,7 +2,7 @@ - hosts: ome connection: local name: "OME - Update Firmware" - gather_facts: False + gather_facts: false vars: retries_count: 100 polling_interval: 10 @@ -13,99 +13,90 @@ - baseline-name - baseline-name-dup - collections: - - dellemc.openmanage - tasks: - - name: "Update firmware from a DUP file using a device ids." - ome_firmware: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - device_id: - - 11111 - - 22222 - dup_file: "/path/Chassis-System-Management_Firmware_6N9WN_WN64_1.00.01_A00.EXE" - register: result - tags: - - device-ids + - name: Update firmware from a DUP file using a device ids. + dellemc.openmanage.ome_firmware: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + device_id: + - 11111 + - 22222 + dup_file: "/path/Chassis-System-Management_Firmware_6N9WN_WN64_1.00.01_A00.EXE" + register: result + tags: + - device-ids - - name: "Update firmware from a DUP file using a device service tags." - ome_firmware: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - device_service_tag: - - KLBR111 - - KLBR222 - dup_file: "/path/Network_Firmware_NTRW0_WN64_14.07.07_A00-00_01.EXE" - register: result - tags: - - service-tags + - name: Update firmware from a DUP file using a device service tags. + dellemc.openmanage.ome_firmware: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + device_service_tag: + - KLBR111 + - KLBR222 + dup_file: "/path/Network_Firmware_NTRW0_WN64_14.07.07_A00-00_01.EXE" + register: result + tags: + - service-tags - - name: "Update firmware from a DUP file using a device group names." - ome_firmware: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - device_group_names: - - servers - dup_file: "/path/BIOS_87V69_WN64_2.4.7.EXE" - register: result - tags: - - group-name + - name: Update firmware from a DUP file using a device group names. + dellemc.openmanage.ome_firmware: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + device_group_names: + - servers + dup_file: "/path/BIOS_87V69_WN64_2.4.7.EXE" + register: result + tags: + - group-name - - name: "Update firmware using baseline name." - ome_firmware: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - baseline_name: baseline_devices - register: result - tags: - - baseline-name - - - name: "Update firmware from a DUP file using a baseline names." - ome_firmware: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - baseline_name: "baseline_devices, baseline_groups" - dup_file: "/path/BIOS_87V69_WN64_2.4.7.EXE" - tags: - - baseline-name-dup + - name: Update firmware using baseline name. + dellemc.openmanage.ome_firmware: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + baseline_name: baseline_devices + register: result + tags: + - baseline-name - - name: "Track job details for the ome firmware update operation using a job id." - ome_job_info: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - job_id: "{{ result.update_status.Id }}" - register: job_result - until: job_result.job_info.LastRunStatus.Name == 'Completed' or job_result.job_info.LastRunStatus.Name == 'Failed' or job_result.job_info.LastRunStatus.Name == 'Warning' - retries: "{{ retries_count }}" - delay: "{{ polling_interval }}" - tags: "{{ all_firmware_task_tags }}" + - name: Track job details for the ome firmware update operation using a job id. + dellemc.openmanage.ome_job_info: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + job_id: "{{ result.update_status.Id }}" + register: job_result + until: job_result.job_info.LastRunStatus.Name == 'Completed' + or job_result.job_info.LastRunStatus.Name == 'Failed' + or job_result.job_info.LastRunStatus.Name == 'Warning' + retries: "{{ retries_count }}" + delay: "{{ polling_interval }}" + tags: "{{ all_firmware_task_tags }}" - - name: "Set job fact details if the task status is warning." - set_fact: - ome_firmware_job_fact: "{{ job_result | combine(job_msg, recursive=true) }}" - failed_when: job_result.job_info.LastRunStatus.Name == 'Warning' - vars: - job_msg: {'msg': 'Completed with {{ job_result.job_info.LastRunStatus.Name|lower}}'} - when: job_result.job_info.LastRunStatus.Name == 'Warning' - tags: "{{ all_firmware_task_tags }}" + - name: Set job fact details if the task status is warning. + ansible.builtin.set_fact: + ome_firmware_job_fact: "{{ job_result | combine(job_msg, recursive=true) }}" + failed_when: job_result.job_info.LastRunStatus.Name == 'Warning' + vars: + job_msg: + { + "msg": "Completed with {{ job_result.job_info.LastRunStatus.Name | lower }}", + } + when: job_result.job_info.LastRunStatus.Name == 'Warning' + tags: "{{ all_firmware_task_tags }}" - - name: "Set job fact details if the task status is completed or failed." - set_fact: - ome_firmware_job_fact: "{{ job_result }}" - failed_when: job_result.job_info.LastRunStatus.Name == 'Failed' - changed_when: job_result.job_info.LastRunStatus.Name == 'Completed' - when: job_result.job_info.LastRunStatus.Name == 'Completed' or job_result.job_info.LastRunStatus.Name == 'Failed' - tags: "{{ all_firmware_task_tags }}" \ No newline at end of file + - name: Set job fact details if the task status is completed or failed. + ansible.builtin.set_fact: + ome_firmware_job_fact: "{{ job_result }}" + failed_when: job_result.job_info.LastRunStatus.Name == 'Failed' + changed_when: job_result.job_info.LastRunStatus.Name == 'Completed' + when: job_result.job_info.LastRunStatus.Name == 'Completed' or job_result.job_info.LastRunStatus.Name == 'Failed' + tags: "{{ all_firmware_task_tags }}" diff --git a/playbooks/ome/ome_active_directory.yml b/playbooks/ome/ome_active_directory.yml index 160118093..d40e8ce35 100644 --- a/playbooks/ome/ome_active_directory.yml +++ b/playbooks/ome/ome_active_directory.yml @@ -2,14 +2,11 @@ - hosts: ome connection: local name: Dell OpenManage Ansible Active Directory service configuration. - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - name: Add Active Directory service using DNS lookup along with the test connection - ome_active_directory: + dellemc.openmanage.ome_active_directory: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" @@ -18,12 +15,12 @@ domain_server: - domainname.com group_domain: domainname.com - test_connection: yes + test_connection: true domain_username: user@domainname domain_password: domain_password - name: Add Active Directory service using IP address of the domain controller with certificate validation - ome_active_directory: + dellemc.openmanage.ome_active_directory: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" @@ -33,11 +30,11 @@ domain_server: - 192.68.20.181 group_domain: domainname.com - validate_certificate: yes + validate_certificate: true certificate_file: "/path/to/certificate/file.cer" - name: Modify domain controller IP address, network_timeout and group_domain - ome_active_directory: + dellemc.openmanage.ome_active_directory: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" @@ -50,7 +47,7 @@ network_timeout: 150 - name: Delete Active Directory service - ome_active_directory: + dellemc.openmanage.ome_active_directory: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" @@ -59,14 +56,14 @@ state: absent - name: Test connection to existing Active Directory service with certificate validation - ome_active_directory: + dellemc.openmanage.ome_active_directory: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" name: my_ad2 - test_connection: yes + test_connection: true domain_username: user@domainname domain_password: domain_password - validate_certificate: yes + validate_certificate: true certificate_file: "/path/to/certificate/file.cer" diff --git a/playbooks/ome/ome_chassis_slots.yml b/playbooks/ome/ome_chassis_slots.yml index 0099fc800..2b1305322 100644 --- a/playbooks/ome/ome_chassis_slots.yml +++ b/playbooks/ome/ome_chassis_slots.yml @@ -2,14 +2,11 @@ - hosts: ome connection: local name: Dell OpenManage Ansible slot name configuration. - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - name: Rename the slots in multiple chassis using slot number and chassis service tag. - ome_chassis_slots: + dellemc.openmanage.ome_chassis_slots: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" @@ -29,7 +26,7 @@ slot_name: sled_name_2 - name: Rename single slot name of the sled using sled ID - ome_chassis_slots: + dellemc.openmanage.ome_chassis_slots: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" @@ -39,7 +36,7 @@ slot_name: slot_device_name_1 - name: Rename single slot name of the sled using sled service tag - ome_chassis_slots: + dellemc.openmanage.ome_chassis_slots: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" @@ -49,7 +46,7 @@ slot_name: service_tag_slot - name: Rename multiple slot names of the devices - ome_chassis_slots: + dellemc.openmanage.ome_chassis_slots: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" diff --git a/playbooks/ome/ome_device_group.yml b/playbooks/ome/ome_device_group.yml index d7af342ab..52365dbe4 100644 --- a/playbooks/ome/ome_device_group.yml +++ b/playbooks/ome/ome_device_group.yml @@ -2,17 +2,14 @@ - hosts: ome connection: local name: Dell OpenManage Ansible device inventory details. - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - name: Add devices to a static device group by using the group name and device IDs - ome_device_group: - hostname: "{{ hostname }}" + dellemc.openmanage.ome_device_group: + hostname: "{{ hostname }}" username: "{{ username }}" - password: "{{ password }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" name: "Storage Services" device_ids: @@ -21,7 +18,7 @@ tags: device-id - name: Add devices to a static device group by using the group name and device service tags - ome_device_group: + dellemc.openmanage.ome_device_group: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" @@ -33,7 +30,7 @@ tags: device-service-tags - name: Add devices to a static device group by using the group ID and device service tags - ome_device_group: + dellemc.openmanage.ome_device_group: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" @@ -45,7 +42,7 @@ tags: group_id_device-service-tags - name: Add devices to a static device group by using the group name and IPv4 addresses - ome_device_group: + dellemc.openmanage.ome_device_group: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" @@ -57,7 +54,7 @@ tags: group_name_ipv4 - name: Add devices to a static device group by using the group ID and IPv6 addresses - ome_device_group: + dellemc.openmanage.ome_device_group: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" @@ -69,7 +66,7 @@ tags: group_id_ipv6 - name: Add devices to a static device group by using the group ID and supported IPv4 and IPv6 address formats. - ome_device_group: + dellemc.openmanage.ome_device_group: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" @@ -83,12 +80,12 @@ - ::ffff:192.0.2.0/125 - fe80::ffff:ffff:ffff:1111-fe80::ffff:ffff:ffff:ffff tags: group_id_ipv4_ipv6 - + - name: Remove devices from a static device group by using the group name and device IDs - ome_device_group: - hostname: "{{ hostname }}" + dellemc.openmanage.ome_device_group: + hostname: "{{ hostname }}" username: "{{ username }}" - password: "{{ password }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" state: "absent" name: "Storage Services" @@ -98,7 +95,7 @@ tags: device-id - name: Remove devices from a static device group by using the group name and device service tags - ome_device_group: + dellemc.openmanage.ome_device_group: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" @@ -111,7 +108,7 @@ tags: device-service-tags - name: Remove devices from a static device group by using the group ID and device service tags - ome_device_group: + dellemc.openmanage.ome_device_group: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" @@ -124,7 +121,7 @@ tags: group_id_device-service-tags - name: Remove devices from a static device group by using the group name and IPv4 addresses - ome_device_group: + dellemc.openmanage.ome_device_group: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" @@ -137,7 +134,7 @@ tags: group_name_ipv4 - name: Remove devices from a static device group by using the group ID and IPv6 addresses - ome_device_group: + dellemc.openmanage.ome_device_group: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" @@ -150,7 +147,7 @@ tags: group_id_ipv6 - name: Remove devices from a static device group by using the group ID and supported IPv4 and IPv6 address formats. - ome_device_group: + dellemc.openmanage.ome_device_group: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" diff --git a/playbooks/ome/ome_device_info.yml b/playbooks/ome/ome_device_info.yml index 6b3077490..10fc7bee8 100644 --- a/playbooks/ome/ome_device_info.yml +++ b/playbooks/ome/ome_device_info.yml @@ -2,21 +2,18 @@ - hosts: ome connection: local name: Dell OpenManage Ansible device inventory details. - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - name: Retrieve basic inventory of all devices. - ome_device_info: - hostname: "{{ hostname }}" + dellemc.openmanage.ome_device_info: + hostname: "{{ hostname }}" username: "{{ username }}" - password: "{{ password }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" - name: Retrieve basic inventory for devices identified by IDs 33333 or 11111 using filtering. - ome_device_info: + dellemc.openmanage.ome_device_info: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" @@ -26,8 +23,8 @@ filter: "Id eq 33333 or Id eq 11111" - name: Retrieve inventory details of specified devices identified by IDs 11111 and 22222. - ome_device_info: - hostname: "{{ hostname }}" + dellemc.openmanage.ome_device_info: + hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" @@ -36,9 +33,9 @@ device_id: - 11111 - 22222 - + - name: Retrieve inventory details of specified devices identified by service tags MXL1234 and MXL4567. - ome_device_info: + dellemc.openmanage.ome_device_info: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" @@ -50,7 +47,7 @@ - MXL4567 - name: Retrieve details of specified inventory type of specified devices identified by ID and service tags. - ome_device_info: + dellemc.openmanage.ome_device_info: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" @@ -65,7 +62,7 @@ inventory_type: "serverDeviceCards" - name: Retrieve subsystem health of specified devices identified by service tags. - ome_device_info: + dellemc.openmanage.ome_device_info: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" @@ -75,5 +72,3 @@ device_service_tag: - MXL1234 - MXL4567 - - diff --git a/playbooks/ome/ome_device_local_access_configuration.yml b/playbooks/ome/ome_device_local_access_configuration.yml index 6f282c8a5..521658184 100644 --- a/playbooks/ome/ome_device_local_access_configuration.yml +++ b/playbooks/ome/ome_device_local_access_configuration.yml @@ -3,66 +3,64 @@ connection: local name: OpenManage Ansible Modules for local access settings. gather_facts: false - collections: dellemc.openmanage tasks: + - name: Configure KVM, direct access and power button settings of the chassis using device ID. + dellemc.openmanage.ome_device_local_access_configuration: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + device_id: 25011 + enable_kvm_access: true + enable_chassis_direct_access: false + chassis_power_button: + enable_chassis_power_button: false + enable_lcd_override_pin: true + disabled_button_lcd_override_pin: 123456 + tags: lac-device-id - - name: Configure KVM, direct access and power button settings of the chassis using device ID. - ome_device_local_access_configuration: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - device_id: 25011 - enable_kvm_access: true - enable_chassis_direct_access: false - chassis_power_button: - enable_chassis_power_button: false - enable_lcd_override_pin: true - disabled_button_lcd_override_pin: 123456 - tags: lac-device-id + - name: Configure Quick sync and LCD settings of the chassis using device service tag. + dellemc.openmanage.ome_device_local_access_configuration: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + device_service_tag: GHRT2RL + quick_sync: + quick_sync_access: READ_ONLY + enable_read_authentication: true + enable_quick_sync_wifi: true + enable_inactivity_timeout: true + timeout_limit: 10 + timeout_limit_unit: MINUTES + lcd: + lcd_access: VIEW_ONLY + lcd_language: en + user_defined: "LCD Text" + tags: lac-tag - - name: Configure Quick sync and LCD settings of the chassis using device service tag. - ome_device_local_access_configuration: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - device_service_tag: GHRT2RL - quick_sync: - quick_sync_access: READ_ONLY - enable_read_authentication: true - enable_quick_sync_wifi: true - enable_inactivity_timeout: true - timeout_limit: 10 - timeout_limit_unit: MINUTES - lcd: - lcd_access: VIEW_ONLY - lcd_language: en - user_defined: "LCD Text" - tags: lac-tag - - - name: Configure all local access settings of the host chassis. - ome_device_local_access_configuration: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - enable_kvm_access: true - enable_chassis_direct_access: false - chassis_power_button: - enable_chassis_power_button: false - enable_lcd_override_pin: true - disabled_button_lcd_override_pin: 123456 - quick_sync: - quick_sync_access: READ_WRITE - enable_read_authentication: true - enable_quick_sync_wifi: true - enable_inactivity_timeout: true - timeout_limit: 120 - timeout_limit_unit: SECONDS - lcd: - lcd_access: VIEW_MODIFY - lcd_language: en - user_defined: "LCD Text" - tags: lac-host + - name: Configure all local access settings of the host chassis. + dellemc.openmanage.ome_device_local_access_configuration: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + enable_kvm_access: true + enable_chassis_direct_access: false + chassis_power_button: + enable_chassis_power_button: false + enable_lcd_override_pin: true + disabled_button_lcd_override_pin: 123456 + quick_sync: + quick_sync_access: READ_WRITE + enable_read_authentication: true + enable_quick_sync_wifi: true + enable_inactivity_timeout: true + timeout_limit: 120 + timeout_limit_unit: SECONDS + lcd: + lcd_access: VIEW_MODIFY + lcd_language: en + user_defined: "LCD Text" + tags: lac-host diff --git a/playbooks/ome/ome_device_location.yml b/playbooks/ome/ome_device_location.yml index d2d860508..9541cd47e 100644 --- a/playbooks/ome/ome_device_location.yml +++ b/playbooks/ome/ome_device_location.yml @@ -3,50 +3,48 @@ connection: local name: OpenManage Ansible Modules gather_facts: false - collections: dellemc.openmanage tasks: + - name: Update device location settings of a chassis using the device ID. + dellemc.openmanage.ome_device_location: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + device_id: 25011 + data_center: data center 1 + room: room 1 + aisle: aisle 1 + rack: rack 1 + rack_slot: 2 + location: location 1 + tags: location-device-id - - name: Update device location settings of a chassis using the device ID. - ome_device_location: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - device_id: 25011 - data_center: data center 1 - room: room 1 - aisle: aisle 1 - rack: rack 1 - rack_slot: 2 - location: location 1 - tags: location-device-id + - name: Update device location settings of a chassis using the device service tag. + dellemc.openmanage.ome_device_location: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + device_service_tag: GHRT2RL + data_center: data center 1 + room: room 1 + aisle: aisle 1 + rack: rack 1 + rack_slot: 2 + location: location 1 + tags: location-device-service-tag - - name: Update device location settings of a chassis using the device service tag. - ome_device_location: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - device_service_tag: GHRT2RL - data_center: data center 1 - room: room 1 - aisle: aisle 1 - rack: rack 1 - rack_slot: 2 - location: location 1 - tags: location-device-service-tag - - - name: Update device location settings of the host chassis. - ome_device_location: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - data_center: data center 1 - room: room 1 - aisle: aisle 1 - rack: rack 1 - rack_slot: 2 - location: location 1 - tags: location-chassis + - name: Update device location settings of the host chassis. + dellemc.openmanage.ome_device_location: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + data_center: data center 1 + room: room 1 + aisle: aisle 1 + rack: rack 1 + rack_slot: 2 + location: location 1 + tags: location-chassis diff --git a/playbooks/ome/ome_device_mgmt_network.yml b/playbooks/ome/ome_device_mgmt_network.yml index e05a3772d..0ebd0590a 100644 --- a/playbooks/ome/ome_device_mgmt_network.yml +++ b/playbooks/ome/ome_device_mgmt_network.yml @@ -2,104 +2,101 @@ - hosts: ome connection: local name: Dell OME Modular device network settings. - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - - name: Network settings for chassis - ome_device_mgmt_network: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" - ca_path: "/path/to/ca_cert.pem" - device_service_tag: CHAS123 - delay: 10 - ipv4_configuration: - enable_ipv4: true - enable_dhcp: false - static_ip_address: 192.168.0.2 - static_subnet_mask: 255.255.254.0 - static_gateway: 192.168.0.3 - use_dhcp_to_obtain_dns_server_address: false - static_preferred_dns_server: 192.168.0.4 - static_alternate_dns_server: 192.168.0.5 - ipv6_configuration: - enable_ipv6: true - enable_auto_configuration: false - static_ip_address: 2626:f2f2:f081:9:1c1c:f1f1:4747:1 - static_prefix_length: 10 - static_gateway: ffff::2607:f2b1:f081:9 - use_dhcpv6_to_obtain_dns_server_address: false - static_preferred_dns_server: 2626:f2f2:f081:9:1c1c:f1f1:4747:3 - static_alternate_dns_server: 2626:f2f2:f081:9:1c1c:f1f1:4747:4 - dns_configuration: - register_with_dns: true - use_dhcp_for_dns_domain_name: false - dns_name: MX-SVCTAG - dns_domain_name: dnslocaldomain - auto_negotiation: no - network_speed: 100_MB + - name: Network settings for chassis + dellemc.openmanage.ome_device_mgmt_network: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + device_service_tag: CHAS123 + delay: 10 + ipv4_configuration: + enable_ipv4: true + enable_dhcp: false + static_ip_address: 192.168.0.2 + static_subnet_mask: 255.255.254.0 + static_gateway: 192.168.0.3 + use_dhcp_to_obtain_dns_server_address: false + static_preferred_dns_server: 192.168.0.4 + static_alternate_dns_server: 192.168.0.5 + ipv6_configuration: + enable_ipv6: true + enable_auto_configuration: false + static_ip_address: 2626:f2f2:f081:9:1c1c:f1f1:4747:1 + static_prefix_length: 10 + static_gateway: ffff::2607:f2b1:f081:9 + use_dhcpv6_to_obtain_dns_server_address: false + static_preferred_dns_server: 2626:f2f2:f081:9:1c1c:f1f1:4747:3 + static_alternate_dns_server: 2626:f2f2:f081:9:1c1c:f1f1:4747:4 + dns_configuration: + register_with_dns: true + use_dhcp_for_dns_domain_name: false + dns_name: MX-SVCTAG + dns_domain_name: dnslocaldomain + auto_negotiation: false + network_speed: 100_MB - - name: Network settings for server - ome_device_mgmt_network: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" - ca_path: "/path/to/ca_cert.pem" - device_service_tag: SRVR123 - ipv4_configuration: - enable_ipv4: true - enable_dhcp: false - static_ip_address: 192.168.0.2 - static_subnet_mask: 255.255.254.0 - static_gateway: 192.168.0.3 - use_dhcp_to_obtain_dns_server_address: false - static_preferred_dns_server: 192.168.0.4 - static_alternate_dns_server: 192.168.0.5 - ipv6_configuration: - enable_ipv6: true - enable_auto_configuration: false - static_ip_address: 2626:f2f2:f081:9:1c1c:f1f1:4747:1 - static_prefix_length: 10 - static_gateway: ffff::2607:f2b1:f081:9 - use_dhcpv6_to_obtain_dns_server_address: false - static_preferred_dns_server: 2626:f2f2:f081:9:1c1c:f1f1:4747:3 - static_alternate_dns_server: 2626:f2f2:f081:9:1c1c:f1f1:4747:4 + - name: Network settings for server + dellemc.openmanage.ome_device_mgmt_network: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + device_service_tag: SRVR123 + ipv4_configuration: + enable_ipv4: true + enable_dhcp: false + static_ip_address: 192.168.0.2 + static_subnet_mask: 255.255.254.0 + static_gateway: 192.168.0.3 + use_dhcp_to_obtain_dns_server_address: false + static_preferred_dns_server: 192.168.0.4 + static_alternate_dns_server: 192.168.0.5 + ipv6_configuration: + enable_ipv6: true + enable_auto_configuration: false + static_ip_address: 2626:f2f2:f081:9:1c1c:f1f1:4747:1 + static_prefix_length: 10 + static_gateway: ffff::2607:f2b1:f081:9 + use_dhcpv6_to_obtain_dns_server_address: false + static_preferred_dns_server: 2626:f2f2:f081:9:1c1c:f1f1:4747:3 + static_alternate_dns_server: 2626:f2f2:f081:9:1c1c:f1f1:4747:4 - - name: Network settings for I/O module - ome_device_mgmt_network: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" - ca_path: "/path/to/ca_cert.pem" - device_service_tag: IOM1234 - ipv4_configuration: - enable_ipv4: true - enable_dhcp: false - static_ip_address: 192.168.0.2 - static_subnet_mask: 255.255.254.0 - static_gateway: 192.168.0.3 - ipv6_configuration: - enable_ipv6: true - enable_auto_configuration: false - static_ip_address: 2626:f2f2:f081:9:1c1c:f1f1:4747:1 - static_prefix_length: 10 - static_gateway: ffff::2607:f2b1:f081:9 - dns_server_settings: - preferred_dns_server: 192.168.0.4 - alternate_dns_server1: 192.168.0.5 + - name: Network settings for I/O module + dellemc.openmanage.ome_device_mgmt_network: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + device_service_tag: IOM1234 + ipv4_configuration: + enable_ipv4: true + enable_dhcp: false + static_ip_address: 192.168.0.2 + static_subnet_mask: 255.255.254.0 + static_gateway: 192.168.0.3 + ipv6_configuration: + enable_ipv6: true + enable_auto_configuration: false + static_ip_address: 2626:f2f2:f081:9:1c1c:f1f1:4747:1 + static_prefix_length: 10 + static_gateway: ffff::2607:f2b1:f081:9 + dns_server_settings: + preferred_dns_server: 192.168.0.4 + alternate_dns_server1: 192.168.0.5 - - name: Management VLAN configuration of chassis using device id - ome_device_mgmt_network: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" - ca_path: "/path/to/ca_cert.pem" - device_id: 12345 - management_vlan: - enable_vlan: true - vlan_id: 2345 - dns_configuration: - register_with_dns: false \ No newline at end of file + - name: Management VLAN configuration of chassis using device id + dellemc.openmanage.ome_device_mgmt_network: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + device_id: 12345 + management_vlan: + enable_vlan: true + vlan_id: 2345 + dns_configuration: + register_with_dns: false diff --git a/playbooks/ome/ome_device_network_services.yml b/playbooks/ome/ome_device_network_services.yml index 0a47d2ddc..644412cc4 100644 --- a/playbooks/ome/ome_device_network_services.yml +++ b/playbooks/ome/ome_device_network_services.yml @@ -3,57 +3,55 @@ connection: local name: OpenManage Ansible Modules for network services settings. gather_facts: false - collections: dellemc.openmanage tasks: + - name: Update network services settings of a chassis using the device ID. + dellemc.openmanage.ome_device_network_services: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + device_id: 25011 + snmp_settings: + enabled: true + port_number: 161 + community_name: public + ssh_settings: + enabled: false + remote_racadm_settings: + enabled: false + tags: snmp-settings - - name: Update network services settings of a chassis using the device ID. - ome_device_power_settings: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - device_id: 25011 - snmp_settings: - enabled: true - port_number: 161 - community_name: public - ssh_settings: - enabled: false - remote_racadm_settings: - enabled: false - tags: snmp-settings + - name: Update network services settings of a chassis using the device service tag. + dellemc.openmanage.ome_device_network_services: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + device_service_tag: GHRT2RL + snmp_settings: + enabled: false + ssh_settings: + enabled: true + port_number: 22 + max_sessions: 1 + max_auth_retries: 3 + idle_timeout: 1 + remote_racadm_settings: + enabled: false + tags: ssh-settings - - name: Update network services settings of a chassis using the device service tag. - ome_device_power_settings: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - device_service_tag: GHRT2RL - snmp_settings: - enabled: false - ssh_settings: - enabled: true - port_number: 22 - max_sessions: 1 - max_auth_retries: 3 - idle_timeout: 1 - remote_racadm_settings: - enabled: false - tags: ssh-settings - - - name: Update network services settings of the host chassis. - ome_device_power_settings: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - device_id: 25012 - snmp_settings: - enabled: false - ssh_settings: - enabled: false - remote_racadm_settings: - enabled: true - tags: racadm-settings + - name: Update network services settings of the host chassis. + dellemc.openmanage.ome_device_network_services: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + device_id: 25012 + snmp_settings: + enabled: false + ssh_settings: + enabled: false + remote_racadm_settings: + enabled: true + tags: racadm-settings diff --git a/playbooks/ome/ome_device_power_settings.yml b/playbooks/ome/ome_device_power_settings.yml index 4b68a29ba..36730e4e0 100644 --- a/playbooks/ome/ome_device_power_settings.yml +++ b/playbooks/ome/ome_device_power_settings.yml @@ -3,52 +3,50 @@ connection: local name: OpenManage Ansible Modules gather_facts: false - collections: dellemc.openmanage tasks: + - name: Update power configuration settings of a chassis using the device ID. + dellemc.openmanage.ome_device_power_settings: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + device_id: 25011 + power_configuration: + enable_power_cap: true + power_cap: 3424 + tags: power-config - - name: Update power configuration settings of a chassis using the device ID. - ome_device_power_settings: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - device_id: 25011 - power_configuration: - enable_power_cap: true - power_cap: 3424 - tags: power-config + - name: Update redundancy configuration settings of a chassis using the device service tag. + dellemc.openmanage.ome_device_power_settings: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + device_service_tag: GHRT2RL + redundancy_configuration: + redundancy_policy: GRID_REDUNDANCY + tags: redundancy-config - - name: Update redundancy configuration settings of a chassis using the device service tag. - ome_device_power_settings: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - device_service_tag: GHRT2RL - redundancy_configuration: - redundancy_policy: GRID_REDUNDANCY - tags: redundancy-config + - name: Update hot spare configuration settings of a chassis using device ID. + dellemc.openmanage.ome_device_power_settings: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + device_id: 25012 + hot_spare_configuration: + enable_hot_spare: true + primary_grid: GRID_1 + tags: hostspare-config - - name: Update hot spare configuration settings of a chassis using device ID. - ome_device_power_settings: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - device_id: 25012 - hot_spare_configuration: - enable_hot_spare: true - primary_grid: GRID_1 - tags: hostspare-config - - - name: Update power configuration settings of a host chassis. - ome_device_power_settings: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - power_configuration: - enable_power_cap: true - power_cap: 3425 - tags: power-config-chassis + - name: Update power configuration settings of a host chassis. + dellemc.openmanage.ome_device_power_settings: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + power_configuration: + enable_power_cap: true + power_cap: 3425 + tags: power-config-chassis diff --git a/playbooks/ome/ome_device_quick_deploy.yml b/playbooks/ome/ome_device_quick_deploy.yml index 71a07e685..f7328c8e5 100644 --- a/playbooks/ome/ome_device_quick_deploy.yml +++ b/playbooks/ome/ome_device_quick_deploy.yml @@ -3,64 +3,62 @@ connection: local name: OpenManage Ansible Modules for Quick Deploy settings. gather_facts: false - collections: dellemc.openmanage tasks: + - name: Configure server Quick Deploy settings of the chassis using device ID. + dellemc.openmanage.ome_device_quick_deploy: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + device_id: 25011 + setting_type: ServerQuickDeploy + quick_deploy_options: + password: "password" + ipv4_enabled: true + ipv4_network_type: Static + ipv4_subnet_mask: 255.255.255.0 + ipv4_gateway: 192.168.0.1 + ipv6_enabled: true + ipv6_network_type: Static + ipv6_prefix_length: 1 + ipv6_gateway: "::" + slots: + - slot_id: 1 + slot_ipv4_address: 192.168.0.2 + slot_ipv6_address: "::" + vlan_id: 1 + - slot_id: 2 + slot_ipv4_address: 192.168.0.3 + slot_ipv6_address: "::" + vlan_id: 2 + tags: server-quick-deploy - - name: Configure server Quick Deploy settings of the chassis using device ID. - ome_device_quick_deploy: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - device_id: 25011 - setting_type: ServerQuickDeploy - quick_deploy_options: - password: "password" - ipv4_enabled: True - ipv4_network_type: Static - ipv4_subnet_mask: 255.255.255.0 - ipv4_gateway: 192.168.0.1 - ipv6_enabled: True - ipv6_network_type: Static - ipv6_prefix_length: 1 - ipv6_gateway: "::" - slots: - - slot_id: 1 - slot_ipv4_address: 192.168.0.2 - slot_ipv6_address: "::" - vlan_id: 1 - - slot_id: 2 - slot_ipv4_address: 192.168.0.3 - slot_ipv6_address: "::" - vlan_id: 2 - tags: server-quick-deploy - - - name: Configure server Quick Deploy settings of the chassis using device service tag. - ome_device_quick_deploy: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - device_service_tag: GHRT2RL - setting_type: IOMQuickDeploy - quick_deploy_options: - password: "password" - ipv4_enabled: True - ipv4_network_type: Static - ipv4_subnet_mask: 255.255.255.0 - ipv4_gateway: 192.168.0.1 - ipv6_enabled: True - ipv6_network_type: Static - ipv6_prefix_length: 1 - ipv6_gateway: "::" - slots: - - slot_id: 1 - slot_ipv4_address: 192.168.0.2 - slot_ipv6_address: "::" - vlan_id: 1 - - slot_id: 2 - slot_ipv4_address: 192.168.0.3 - slot_ipv6_address: "::" - vlan_id: 2 - tags: iom-quick-deploy + - name: Configure server Quick Deploy settings of the chassis using device service tag. + dellemc.openmanage.ome_device_quick_deploy: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + device_service_tag: GHRT2RL + setting_type: IOMQuickDeploy + quick_deploy_options: + password: "password" + ipv4_enabled: true + ipv4_network_type: Static + ipv4_subnet_mask: 255.255.255.0 + ipv4_gateway: 192.168.0.1 + ipv6_enabled: true + ipv6_network_type: Static + ipv6_prefix_length: 1 + ipv6_gateway: "::" + slots: + - slot_id: 1 + slot_ipv4_address: 192.168.0.2 + slot_ipv6_address: "::" + vlan_id: 1 + - slot_id: 2 + slot_ipv4_address: 192.168.0.3 + slot_ipv6_address: "::" + vlan_id: 2 + tags: iom-quick-deploy diff --git a/playbooks/ome/ome_devices.yml b/playbooks/ome/ome_devices.yml index ba93eb006..b2e0363ba 100644 --- a/playbooks/ome/ome_devices.yml +++ b/playbooks/ome/ome_devices.yml @@ -2,47 +2,44 @@ - hosts: ome connection: local name: Dell OpenManage Ansible device operations. - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - name: Refresh Inventory - ome_devices: - hostname: "{{ hostname }}" + dellemc.openmanage.ome_devices: + hostname: "{{ hostname }}" username: "{{ username }}" - password: "{{ password }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" device_action: refresh_inventory device_service_tags: - 2HB7NX2 - name: Clear iDRAC job queue - ome_devices: - hostname: "{{ hostname }}" + dellemc.openmanage.ome_devices: + hostname: "{{ hostname }}" username: "{{ username }}" - password: "{{ password }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" device_action: clear_idrac_job_queue device_service_tags: - 2HB7NX2 - name: Reset iDRAC using the service tag - ome_devices: - hostname: "{{ hostname }}" + dellemc.openmanage.ome_devices: + hostname: "{{ hostname }}" username: "{{ username }}" - password: "{{ password }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" device_action: reset_idrac device_service_tags: - 2H7HNX2 - name: Remove devices using servicetags - ome_devices: - hostname: "{{ hostname }}" + dellemc.openmanage.ome_devices: + hostname: "{{ hostname }}" username: "{{ username }}" - password: "{{ password }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" state: absent device_service_tags: @@ -50,10 +47,10 @@ - SVCTAF2 - name: Remove devices using IDs - ome_devices: - hostname: "{{ hostname }}" + dellemc.openmanage.ome_devices: + hostname: "{{ hostname }}" username: "{{ username }}" - password: "{{ password }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" state: absent device_ids: diff --git a/playbooks/ome/ome_diagnostics.yml b/playbooks/ome/ome_diagnostics.yml index d7e80b234..222939a66 100644 --- a/playbooks/ome/ome_diagnostics.yml +++ b/playbooks/ome/ome_diagnostics.yml @@ -2,14 +2,11 @@ - hosts: ome connection: local name: Dell OpenManage Ansible diagnostics operation. - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - name: Application log extraction using CIFS share location - ome_diagnostics: + dellemc.openmanage.ome_diagnostics: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" @@ -25,7 +22,7 @@ tags: app-cifs-log - name: Application log extraction using NFS share location - ome_diagnostics: + dellemc.openmanage.ome_diagnostics: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" @@ -39,7 +36,7 @@ tags: app-nfs-log - name: Support assist log extraction using CIFS share location - ome_diagnostics: + dellemc.openmanage.ome_diagnostics: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" @@ -58,7 +55,7 @@ tags: tsr-cifs-log - name: Support assist log extraction using NFS share location - ome_diagnostics: + dellemc.openmanage.ome_diagnostics: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" diff --git a/playbooks/ome/ome_discovery.yml b/playbooks/ome/ome_discovery.yml index d693234d8..d841069d6 100644 --- a/playbooks/ome/ome_discovery.yml +++ b/playbooks/ome/ome_discovery.yml @@ -2,17 +2,14 @@ - hosts: ome connection: local name: Dell OpenManage Ansible discovery operations. - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - name: Discover servers in a range - ome_discovery: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_discovery: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" discovery_job_name: "Discovery_server_1" discovery_config_targets: @@ -27,10 +24,10 @@ - server_discovery - name: Discover chassis in a range - ome_discovery: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_discovery: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" discovery_job_name: "Discovery_chassis_1" discovery_config_targets: @@ -45,10 +42,10 @@ - chassis_discovery - name: Discover switches in a range - ome_discovery: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_discovery: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" discovery_job_name: "Discover_switch_1" discovery_config_targets: @@ -62,10 +59,10 @@ - switch_discovery - name: Discover storage in a range - ome_discovery: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_discovery: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" discovery_job_name: "Discover_storage_1" discovery_config_targets: @@ -82,10 +79,10 @@ - storage_discovery - name: Delete a discovery job - ome_discovery: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_discovery: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" state: "absent" discovery_job_name: "Discovery-123" @@ -93,10 +90,10 @@ - delete_discovery - name: Schedule the discovery of multiple devices ignoring partial failure and enable trap to receive alerts - ome_discovery: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_discovery: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" state: "present" discovery_job_name: "Discovery-123" @@ -136,18 +133,18 @@ password: ipmi_pwd schedule: RunLater cron: "0 0 9 ? * MON,WED,FRI *" - ignore_partial_failure: True - trap_destination: True - community_string: True + ignore_partial_failure: true + trap_destination: true + community_string: true email_recipient: test_email@company.com tags: - schedule_discovery - name: Discover servers with ca check enabled - ome_discovery: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_discovery: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" discovery_job_name: "Discovery_server_ca1" discovery_config_targets: @@ -158,13 +155,13 @@ wsman: username: user password: password - ca_check: True + ca_check: true certificate_data: "{{ lookup('ansible.builtin.file', '/path/to/certificate_data_file') }}" tags: - server_ca_check - name: Discover chassis with ca check enabled data - ome_discovery: + dellemc.openmanage.ome_discovery: hostname: "192.168.0.1" username: "username" password: "password" @@ -178,12 +175,12 @@ redfish: username: user password: password - ca_check: True - certificate_data: "-----BEGIN CERTIFICATE-----\r\n - ABCDEFGHIJKLMNOPQRSTUVWXYZaqwertyuiopasdfghjklzxcvbnmasdasagasvv\r\n - ABCDEFGHIJKLMNOPQRSTUVWXYZaqwertyuiopasdfghjklzxcvbnmasdasagasvv\r\n - ABCDEFGHIJKLMNOPQRSTUVWXYZaqwertyuiopasdfghjklzxcvbnmasdasagasvv\r\n - aqwertyuiopasdfghjklzxcvbnmasdasagasvv=\r\n - -----END CERTIFICATE-----" + ca_check: true + certificate_data: " -----BEGIN CERTIFICATE----- + ABCDEFGHIJKLMNOPQRSTUVWXYZaqwertyuiopasdfghjklzxcvbnmasdasagasvv + ABCDEFGHIJKLMNOPQRSTUVWXYZaqwertyuiopasdfghjklzxcvbnmasdasagasvv + ABCDEFGHIJKLMNOPQRSTUVWXYZaqwertyuiopasdfghjklzxcvbnmasdasagasvv + aqwertyuiopasdfghjklzxcvbnmasdasagasvv= + -----END CERTIFICATE----- " tags: - - chassis_ca_check_data \ No newline at end of file + - chassis_ca_check_data diff --git a/playbooks/ome/ome_domain_user_groups.yml b/playbooks/ome/ome_domain_user_groups.yml index 545a10d12..302bbc211 100644 --- a/playbooks/ome/ome_domain_user_groups.yml +++ b/playbooks/ome/ome_domain_user_groups.yml @@ -5,7 +5,6 @@ gather_facts: false tasks: - - name: Create Active Directory user groups. dellemc.openmanage.ome_domain_user_groups: hostname: "{{ hostname }}" diff --git a/playbooks/ome/ome_group_device_action.yml b/playbooks/ome/ome_group_device_action.yml index 08b03786e..421f57ebe 100644 --- a/playbooks/ome/ome_group_device_action.yml +++ b/playbooks/ome/ome_group_device_action.yml @@ -2,11 +2,11 @@ - hosts: ome connection: local name: Dell OpenManage Ansible group device operations. - gather_facts: False + gather_facts: false vars: group_name: Dell iDRAC Servers - device_action: refresh_inventory #other options are clear_idrac_job_queue, reset_idrac - validate_certs: True + device_action: refresh_inventory # other options are clear_idrac_job_queue, reset_idrac + validate_certs: true ca_path: "/path/to/ca_cert.pem" tasks: @@ -16,19 +16,19 @@ user: "{{ username }}" password: "{{ password }}" method: "GET" - use_proxy: yes + use_proxy: true status_code: 200 - return_content: yes + return_content: true validate_certs: "{{ validate_certs }}" ca_path: "{{ ca_path }}" - force_basic_auth: yes + force_basic_auth: true headers: Content-Type: "application/json" Accept: "application/json" register: group_id - name: Assign group ID to a variable. - set_fact: + ansible.builtin.set_fact: group_id_value: "{{ group_id.json.value[0].Id }}" - name: Retrieve all devices under the group ID. @@ -37,28 +37,28 @@ user: "{{ username }}" password: "{{ password }}" method: "GET" - use_proxy: yes + use_proxy: true status_code: 200 - return_content: yes + return_content: true validate_certs: "{{ validate_certs }}" ca_path: "{{ ca_path }}" - force_basic_auth: yes + force_basic_auth: true headers: Content-Type: "application/json" Accept: "application/json" register: all_devices - name: Empty list to store device IDs. - set_fact: + ansible.builtin.set_fact: devices_list: [] - name: Add devices retrieved from a group to the list. - set_fact: + ansible.builtin.set_fact: devices_list: "{{ devices_list + [item.Id] }}" with_items: - "{{ all_devices.json.value }}" - - name: Perform device action tasks on devices. + - name: Perform device action tasks on devices. # noqa: args[module] dellemc.openmanage.ome_devices: hostname: "{{ hostname }}" username: "{{ username }}" diff --git a/playbooks/ome/ome_groups.yml b/playbooks/ome/ome_groups.yml index 027a53d09..76fe49752 100644 --- a/playbooks/ome/ome_groups.yml +++ b/playbooks/ome/ome_groups.yml @@ -2,14 +2,11 @@ - hosts: ome connection: local name: Dell OpenManage Ansible Group configuration. - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - name: Create a new device group - ome_groups: + dellemc.openmanage.ome_groups: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" @@ -21,7 +18,7 @@ - create_group - name: Modify a device group using the group ID - ome_groups: + dellemc.openmanage.ome_groups: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" @@ -33,7 +30,7 @@ - modify_group - name: Delete a device group using the device group name - ome_groups: + dellemc.openmanage.ome_groups: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" @@ -44,7 +41,7 @@ - delete_name - name: Delete multiple device groups using the group IDs - ome_groups: + dellemc.openmanage.ome_groups: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" diff --git a/playbooks/ome/ome_identity_pool.yml b/playbooks/ome/ome_identity_pool.yml index b5d960ca1..3b40cdf65 100644 --- a/playbooks/ome/ome_identity_pool.yml +++ b/playbooks/ome/ome_identity_pool.yml @@ -2,95 +2,92 @@ - hosts: ome connection: local name: Dell OpenManage Ansible identity pool operations. - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - - name: "Create an identity pool using ethernet, FCoE, iSCSI and FC settings." - ome_identity_pool: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + - name: Create an identity pool using ethernet, FCoE, iSCSI and FC settings. + dellemc.openmanage.ome_identity_pool: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" state: present pool_name: "pool1" pool_description: "Identity pool with Ethernet, FCoE, ISCSI and FC settings" ethernet_settings: - starting_mac_address: "50:50:50:50:50:00" - identity_count: 60 + starting_mac_address: "50:50:50:50:50:00" + identity_count: 60 fcoe_settings: - starting_mac_address: "aabb.ccdd.7070" - identity_count: 75 + starting_mac_address: "aabb.ccdd.7070" + identity_count: 75 iscsi_settings: - starting_mac_address: "60:60:60:60:60:00" - identity_count: 30 - initiator_config: - iqn_prefix: "iqn.myprefix." - initiator_ip_pool_settings: - ip_range: "10.33.0.1-10.33.0.255" - subnet_mask: "255.255.255.0" - gateway: "192.168.4.1" - primary_dns_server: "10.8.8.8" - secondary_dns_server: "8.8.8.8" + starting_mac_address: "60:60:60:60:60:00" + identity_count: 30 + initiator_config: + iqn_prefix: "iqn.myprefix." + initiator_ip_pool_settings: + ip_range: "10.33.0.1-10.33.0.255" + subnet_mask: "255.255.255.0" + gateway: "192.168.4.1" + primary_dns_server: "10.8.8.8" + secondary_dns_server: "8.8.8.8" fc_settings: - starting_address: "10-10-10-10-10-10" - identity_count: 45 + starting_address: "10-10-10-10-10-10" + identity_count: 45 tags: create1 - - - name: "Create an identity pool using only ethernet settings." - ome_identity_pool: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + + - name: Create an identity pool using only ethernet settings. + dellemc.openmanage.ome_identity_pool: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" pool_name: "pool2" pool_description: "Identity pool with ethernet" ethernet_settings: - starting_mac_address: "aa-bb-cc-dd-ee-aa" - identity_count: 80 + starting_mac_address: "aa-bb-cc-dd-ee-aa" + identity_count: 80 tags: create2 - - - name: "Create an identity pool using only iSCSI settings" - ome_identity_pool: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + + - name: Create an identity pool using only iSCSI settings + dellemc.openmanage.ome_identity_pool: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" pool_name: "pool3" pool_description: "Identity pool with iscsi" iscsi_settings: - starting_mac_address: "10:10:10:10:10:00" - identity_count: 30 - initiator_config: - iqn_prefix: "iqn.myprefix." - initiator_ip_pool_settings: - ip_range: "20.33.0.1-20.33.0.255" - subnet_mask: "255.255.255.0" - gateway: "192.168.4.1" - primary_dns_server: "10.8.8.8" - secondary_dns_server: "8.8.8.8" + starting_mac_address: "10:10:10:10:10:00" + identity_count: 30 + initiator_config: + iqn_prefix: "iqn.myprefix." + initiator_ip_pool_settings: + ip_range: "20.33.0.1-20.33.0.255" + subnet_mask: "255.255.255.0" + gateway: "192.168.4.1" + primary_dns_server: "10.8.8.8" + secondary_dns_server: "8.8.8.8" tags: create3 - - - name: "Modify an identity pool using FC settings." - ome_identity_pool: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + + - name: Modify an identity pool using FC settings. + dellemc.openmanage.ome_identity_pool: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" pool_name: "pool2" pool_description: "Identity pool with fc_settings" fc_settings: - starting_address: "40:40:40:40:40:22" - identity_count: 48 + starting_address: "40:40:40:40:40:22" + identity_count: 48 tags: modify1 - - name: "Modify an identity pool." - ome_identity_pool: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + - name: Modify an identity pool. + dellemc.openmanage.ome_identity_pool: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" pool_name: "pool1" new_pool_name: "pool_new" @@ -103,11 +100,11 @@ identity_count: 77 tags: modify2 - - name: "Modify an identity pool using iSCSI and FC settings." - ome_identity_pool: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + - name: Modify an identity pool using iSCSI and FC settings. + dellemc.openmanage.ome_identity_pool: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" pool_name: "pool_new" new_pool_name: "pool_new2" @@ -123,11 +120,11 @@ identity_count: 98 tags: modify3 - - name: "Delete an identity pool" - ome_identity_pool: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + - name: Delete an identity pool + dellemc.openmanage.ome_identity_pool: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" state: "absent" pool_name: "pool1" diff --git a/playbooks/ome/ome_job_info.yml b/playbooks/ome/ome_job_info.yml index f90892adb..4daef5a48 100644 --- a/playbooks/ome/ome_job_info.yml +++ b/playbooks/ome/ome_job_info.yml @@ -2,34 +2,31 @@ - hosts: ome connection: local name: Dell OpenManage Ansible job details. - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - - name: Get all jobs details. - ome_job_info: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" + - name: Get all jobs details. + dellemc.openmanage.ome_job_info: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" - - name: Get job details for id. - ome_job_info: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - job_id: 12345 + - name: Get job details for id. + dellemc.openmanage.ome_job_info: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + job_id: 12345 - - name: Get filtered job details. - ome_job_info: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - system_query_options: - top: 2 - skip: 1 - filter: "JobType/Id eq 8" \ No newline at end of file + - name: Get filtered job details. + dellemc.openmanage.ome_job_info: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + system_query_options: + top: 2 + skip: 1 + filter: "JobType/Id eq 8" diff --git a/playbooks/ome/ome_network_port_breakout.yml b/playbooks/ome/ome_network_port_breakout.yml index c9a8db75e..721d2615e 100644 --- a/playbooks/ome/ome_network_port_breakout.yml +++ b/playbooks/ome/ome_network_port_breakout.yml @@ -2,18 +2,14 @@ - hosts: ome connection: local name: Dell OpenManage ansible port breakout configuration. - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - - name: Port breakout configuration. - ome_network_port_breakout: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_network_port_breakout: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" target_port: "2HB7NX2:phy-port1/1/11" breakout_type: "1X40GE" @@ -21,10 +17,10 @@ - port-config - name: Revoke the default breakout configuration. - ome_network_port_breakout: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_network_port_breakout: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" target_port: "2HB7NX2:phy-port1/1/11" breakout_type: "HardwareDefault" diff --git a/playbooks/ome/ome_network_port_breakout_job_traking.yml b/playbooks/ome/ome_network_port_breakout_job_traking.yml index b94b6b48a..7a8bc5657 100644 --- a/playbooks/ome/ome_network_port_breakout_job_traking.yml +++ b/playbooks/ome/ome_network_port_breakout_job_traking.yml @@ -2,28 +2,24 @@ - hosts: ome connection: local name: Dell OpenManage ansible port breakout configuration. - gather_facts: False + gather_facts: false vars: retries_count: 50 polling_interval: 5 # in seconds - collections: - - dellemc.openmanage - tasks: - - name: Port breakout configuration. - ome_network_port_breakout: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_network_port_breakout: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" target_port: "2HB7NX2:phy-port1/1/11" breakout_type: "1X40GE" register: result - - name: "Get job details using job id from port breakout configuration task." - ome_job_info: + - name: Get job details using job id from port breakout configuration task. + dellemc.openmanage.ome_job_info: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" diff --git a/playbooks/ome/ome_network_vlan.yml b/playbooks/ome/ome_network_vlan.yml index 593a86c88..bf8aea1fa 100644 --- a/playbooks/ome/ome_network_vlan.yml +++ b/playbooks/ome/ome_network_vlan.yml @@ -2,17 +2,14 @@ - hosts: ome connection: local name: Dell OpenManage Ansible VLAN operations. - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - - name: "Create a VLAN range" - ome_network_vlan: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + - name: Create a VLAN range + dellemc.openmanage.ome_network_vlan: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" state: present name: "vlan1" @@ -22,11 +19,11 @@ vlan_maximum: 40 tags: create_vlan_range - - name: "Create a VLAN with a single value" - ome_network_vlan: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + - name: Create a VLAN with a single value + dellemc.openmanage.ome_network_vlan: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" state: present name: "vlan2" @@ -36,11 +33,11 @@ vlan_maximum: 127 tags: create_vlan_single - - name: "Modify a VLAN" - ome_network_vlan: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + - name: Modify a VLAN + dellemc.openmanage.ome_network_vlan: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" state: present name: "vlan1" @@ -51,11 +48,11 @@ vlan_maximum: 50 tags: modify_vlan - - name: "Delete a VLAN" - ome_network_vlan: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + - name: Delete a VLAN + dellemc.openmanage.ome_network_vlan: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" state: "absent" name: "vlan1" diff --git a/playbooks/ome/ome_network_vlan_info.yml b/playbooks/ome/ome_network_vlan_info.yml index 3cf9c3c23..2040b496c 100644 --- a/playbooks/ome/ome_network_vlan_info.yml +++ b/playbooks/ome/ome_network_vlan_info.yml @@ -2,21 +2,18 @@ - hosts: ome connection: local name: Dell OpenManage Ansible OpenManage Enterprise network vlan details. - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - name: Retrieve information about all network VLANs(s) available in the device. - ome_network_vlan_info: + dellemc.openmanage.ome_network_vlan_info: hostname: "192.168.0.1" username: "username" password: "password" ca_path: "/path/to/ca_cert.pem" - name: Retrieve information about a network VLAN using the VLAN ID. - ome_network_vlan_info: + dellemc.openmanage.ome_network_vlan_info: hostname: "192.168.0.1" username: "username" password: "password" @@ -24,7 +21,7 @@ id: 12345 - name: Retrieve information about a network VLAN using the VLAN name. - ome_network_vlan_info: + dellemc.openmanage.ome_network_vlan_info: hostname: "192.168.0.1" username: "username" password: "password" diff --git a/playbooks/ome/ome_server_interface_profile_info.yml b/playbooks/ome/ome_server_interface_profile_info.yml index 0fa98711b..be397a36f 100644 --- a/playbooks/ome/ome_server_interface_profile_info.yml +++ b/playbooks/ome/ome_server_interface_profile_info.yml @@ -2,14 +2,11 @@ - hosts: ome connection: local name: Dell OpenManage Ansible server interface profile information. - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - name: Retrieves the server interface profiles of all the device using device ID. - ome_server_interface_profile_info: + dellemc.openmanage.ome_server_interface_profile_info: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" @@ -21,7 +18,7 @@ - sip-device-id - name: Retrieves the server interface profiles of all the device using device service tag. - ome_server_interface_profile_info: + dellemc.openmanage.ome_server_interface_profile_info: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" diff --git a/playbooks/ome/ome_server_interface_profile_workflow.yml b/playbooks/ome/ome_server_interface_profile_workflow.yml index cf1e2c228..a5cf69343 100644 --- a/playbooks/ome/ome_server_interface_profile_workflow.yml +++ b/playbooks/ome/ome_server_interface_profile_workflow.yml @@ -2,19 +2,15 @@ - hosts: ome connection: local name: Dell OpenManage Ansible server interface profile workflow. - gather_facts: False + gather_facts: false vars: retries_count: 100 - polling_interval: 10 #in seconds + polling_interval: 10 # in seconds src_service_tag: 7GHH6H1 - collections: - - dellemc.openmanage - tasks: - - name: Create a smart fabric. - ome_smart_fabric: + dellemc.openmanage.ome_smart_fabric: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" @@ -28,13 +24,13 @@ override_LLDP_configuration: "Enabled" register: fabric_result - - name: "sleep for 300 seconds and continue with play" - wait_for: + - name: Sleep for 300 seconds and continue with play # noqa: no-handler + ansible.builtin.wait_for: timeout: 300 - when: fabric_result.changed == True + when: not fabric_result.changed - name: Create a template from a reference device service tag. - ome_template: + dellemc.openmanage.ome_template: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" @@ -46,8 +42,8 @@ register: result failed_when: "'return_id' not in result" - - name: "Get the job id using return id from template." - ome_template_info: + - name: Get the job id using return id from template. + dellemc.openmanage.ome_template_info: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" @@ -55,8 +51,8 @@ template_id: "{{ result.return_id }}" register: facts_result - - name: "Get job details using job id from template task." - ome_job_info: + - name: Get job details using job id from template task. + dellemc.openmanage.ome_job_info: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" @@ -82,11 +78,12 @@ - 6GHH6H2 register: deploy_result - - name: "sleep for 10 seconds and continue with play" - wait_for: timeout=10 + - name: Sleep for 10 seconds and continue with play + ansible.builtin.wait_for: + timeout: 10 - - name: "Track the deploy job till completion" - ome_job_info: + - name: Track the deploy job till completion + dellemc.openmanage.ome_job_info: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" @@ -99,7 +96,7 @@ delay: "{{ polling_interval }}" - name: Modify Server Interface Profile for the server using the service tag. - ome_server_interface_profiles: + dellemc.openmanage.ome_server_interface_profiles: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" @@ -109,14 +106,14 @@ nic_teaming: NoTeaming nic_configuration: - nic_identifier: NIC.Mezzanine.1A-1-1 - team: no + team: false untagged_network: 2 tagged_networks: names: - vlan - name: Retrieves the server interface profiles of all the device using device service tag. - ome_server_interface_profile_info: + dellemc.openmanage.ome_server_interface_profile_info: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" diff --git a/playbooks/ome/ome_server_interface_profiles.yml b/playbooks/ome/ome_server_interface_profiles.yml index c003b7141..35efd20ed 100644 --- a/playbooks/ome/ome_server_interface_profiles.yml +++ b/playbooks/ome/ome_server_interface_profiles.yml @@ -2,17 +2,14 @@ - hosts: omem connection: local name: Dell OpenManage Ansible server interface profiles configuration. - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - name: Modify Server Interface Profile for the server using the service tag - ome_server_interface_profiles: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_server_interface_profiles: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" device_service_tag: - SVCTAG1 @@ -20,23 +17,23 @@ nic_teaming: LACP nic_configuration: - nic_identifier: NIC.Mezzanine.1A-1-1 - team: no + team: false untagged_network: 2 tagged_networks: names: - vlan1 - nic_identifier: NIC.Mezzanine.1A-2-1 - team: yes + team: true untagged_network: 3 tagged_networks: names: - range120-125 - name: Modify Server Interface Profile for the server using the id - ome_server_interface_profiles: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_server_interface_profiles: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" device_id: - 34523 @@ -44,13 +41,13 @@ nic_teaming: NoTeaming nic_configuration: - nic_identifier: NIC.Mezzanine.1A-1-1 - team: no + team: false untagged_network: 2 tagged_networks: names: - vlan2 - nic_identifier: NIC.Mezzanine.1A-2-1 - team: yes + team: true untagged_network: 3 tagged_networks: names: diff --git a/playbooks/ome/ome_smart_fabric.yml b/playbooks/ome/ome_smart_fabric.yml index e889168d3..0d38f38db 100644 --- a/playbooks/ome/ome_smart_fabric.yml +++ b/playbooks/ome/ome_smart_fabric.yml @@ -2,17 +2,14 @@ - hosts: ome connection: local name: Dell OpenManage Ansible smart fabric operations. - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - - name: "Create a smart fabric" - ome_smart_fabric: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + - name: Create a smart fabric + dellemc.openmanage.ome_smart_fabric: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" state: present name: "fabric1" @@ -23,11 +20,11 @@ override_LLDP_configuration: "Enabled" tags: create_smart_fabric - - name: "Modify a smart fabric" - ome_smart_fabric: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + - name: Modify a smart fabric + dellemc.openmanage.ome_smart_fabric: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" state: present name: "fabric1" @@ -35,12 +32,11 @@ description: "new description" tags: modify_smart_fabric - - - name: "Delete a smart fabric" - ome_smart_fabric: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + - name: Delete a smart fabric + dellemc.openmanage.ome_smart_fabric: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" state: "absent" name: "fabric1" diff --git a/playbooks/ome/ome_smart_fabric_info.yml b/playbooks/ome/ome_smart_fabric_info.yml index 0bbaad25f..c769e4808 100644 --- a/playbooks/ome/ome_smart_fabric_info.yml +++ b/playbooks/ome/ome_smart_fabric_info.yml @@ -4,19 +4,16 @@ name: Dell OpenManage Ansible smart fabric details. gather_facts: false - collections: - - dellemc.openmanage - tasks: - name: Get all smart fabric info. - ome_smart_fabric_info: + dellemc.openmanage.ome_smart_fabric_info: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" - name: Get specific smart fabric info using fabric ID. - ome_smart_fabric_info: + dellemc.openmanage.ome_smart_fabric_info: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" @@ -24,7 +21,7 @@ fabric_id: "61c20a59-9ed5-4ae5-b850-5e5acf42d2f2" - name: Get specific smart fabric info using fabric name. - ome_smart_fabric_info: + dellemc.openmanage.ome_smart_fabric_info: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" diff --git a/playbooks/ome/ome_smart_fabric_uplink.yml b/playbooks/ome/ome_smart_fabric_uplink.yml index 88b5cc62e..b5eee05e2 100644 --- a/playbooks/ome/ome_smart_fabric_uplink.yml +++ b/playbooks/ome/ome_smart_fabric_uplink.yml @@ -2,17 +2,14 @@ - hosts: ome connection: local name: Dell OpenManage Ansible smart fabric uplink configuration. - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - - name: "Create a Uplink" - ome_smart_fabric_uplink: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + - name: Create a Uplink + dellemc.openmanage.ome_smart_fabric_uplink: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" state: "present" fabric_name: "fabric1" @@ -34,11 +31,11 @@ untagged_network: vlan2 tags: create_uplink - - name: "modify a existing uplink1" - ome_smart_fabric_uplink: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + - name: Modify a existing uplink1 + dellemc.openmanage.ome_smart_fabric_uplink: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" state: "present" fabric_name: "fabric1" @@ -61,22 +58,22 @@ untagged_network: vlan22 tags: modify_uplink - - name: "Delete a Uplink" - ome_smart_fabric_uplink: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + - name: Delete a Uplink + dellemc.openmanage.ome_smart_fabric_uplink: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" state: "absent" fabric_name: "fabric1" name: "uplink1" tags: delete_uplink - - name: "Modify the Uplink name" - ome_smart_fabric_uplink: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + - name: Modify the Uplink name + dellemc.openmanage.ome_smart_fabric_uplink: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" state: "present" fabric_name: "fabric1" @@ -84,11 +81,11 @@ new_name: "uplink2" tags: modify_uplink_name - - name: "Modify a Uplink ports" - ome_smart_fabric_uplink: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + - name: Modify a Uplink ports + dellemc.openmanage.ome_smart_fabric_uplink: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" state: "present" fabric_name: "fabric1" @@ -104,11 +101,11 @@ - ethernet1/1/10 tags: modify_ports - - name: "Modify Uplink networks" - ome_smart_fabric_uplink: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + - name: Modify Uplink networks + dellemc.openmanage.ome_smart_fabric_uplink: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" state: "present" fabric_name: "fabric1" diff --git a/playbooks/ome/ome_smart_fabric_uplink_info.yml b/playbooks/ome/ome_smart_fabric_uplink_info.yml index 61408c409..e7f2dfdcd 100644 --- a/playbooks/ome/ome_smart_fabric_uplink_info.yml +++ b/playbooks/ome/ome_smart_fabric_uplink_info.yml @@ -4,12 +4,9 @@ name: Fetch fabric uplink information. gather_facts: false - collections: - - dellemc.openmanage - tasks: - name: Retrieve all fabric uplink information using fabric_id. - ome_smart_fabric_uplink_info: + dellemc.openmanage.ome_smart_fabric_uplink_info: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" @@ -17,7 +14,7 @@ fabric_id: "61c20a59-9ed5-4ae5-b850-5e5acf42d2f2" - name: Retrieve all fabric uplink information using fabric_name. - ome_smart_fabric_uplink_info: + dellemc.openmanage.ome_smart_fabric_uplink_info: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" @@ -25,7 +22,7 @@ fabric_name: "f1" - name: Retrieve specific fabric information using uplink_id. - ome_smart_fabric_uplink_info: + dellemc.openmanage.ome_smart_fabric_uplink_info: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" @@ -34,7 +31,7 @@ uplink_id: "1ad54420-b145-49a1-9779-21a579ef6f2d" - name: Retrieve specific fabric information using uplink_name. - ome_smart_fabric_uplink_info: + dellemc.openmanage.ome_smart_fabric_uplink_info: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" diff --git a/playbooks/ome/ome_template_identity_pool.yml b/playbooks/ome/ome_template_identity_pool.yml index 433954aa0..12d9b2453 100644 --- a/playbooks/ome/ome_template_identity_pool.yml +++ b/playbooks/ome/ome_template_identity_pool.yml @@ -2,18 +2,14 @@ - hosts: ome connection: local name: Dell OpenManage Ansible template identity pool attach and detach operation. - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - - name: Attach an identity pool to a template. - ome_template_identity_pool: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_template_identity_pool: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" template_name: template_name identity_pool_name: identity_pool_name @@ -21,11 +17,11 @@ - attach - name: Detach an identity pool from a template. - ome_template_identity_pool: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_template_identity_pool: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" template_name: template_name tags: - - detach \ No newline at end of file + - detach diff --git a/playbooks/ome/powerstate/ome_powerstate.yml b/playbooks/ome/powerstate/ome_powerstate.yml index 517ff118d..1ed1fcc4e 100644 --- a/playbooks/ome/powerstate/ome_powerstate.yml +++ b/playbooks/ome/powerstate/ome_powerstate.yml @@ -2,50 +2,47 @@ - hosts: ome connection: local name: Dell OpenManage Ansible - OME Power state operations. - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - - name: Power state operation based on device id. - ome_powerstate: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - device_id: 11111 - power_state: "off" + - name: Power state operation based on device id. + dellemc.openmanage.ome_powerstate: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + device_id: 11111 + power_state: "off" - - name: Power state operation based on device service tag. - ome_powerstate: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - device_service_tag: "KLBR111" - power_state: "on" + - name: Power state operation based on device service tag. + dellemc.openmanage.ome_powerstate: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + device_service_tag: "KLBR111" + power_state: "on" - - name: Power state operation based on list of device ids. - ome_powerstate: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - device_id: "{{ item.device_id }}" - power_state: "{{ item.state }}" - with_items: - - { "device_id": 11111, "state": "on" } - - { "device_id": 22222, "state": "off" } + - name: Power state operation based on list of device ids. + dellemc.openmanage.ome_powerstate: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + device_id: "{{ item.device_id }}" + power_state: "{{ item.state }}" + with_items: + - { "device_id": 11111, "state": "on" } + - { "device_id": 22222, "state": "off" } - - name: Power state operation based on list of device service tags. - ome_powerstate: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - device_service_tag: "{{ item.service_tag }}" - power_state: "{{ item.state }}" - with_items: - - { "service_tag": "KLBR111", "state": "on" } - - { "service_tag": "KLBR222", "state": "off" } \ No newline at end of file + - name: Power state operation based on list of device service tags. + dellemc.openmanage.ome_powerstate: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + device_service_tag: "{{ item.service_tag }}" + power_state: "{{ item.state }}" + with_items: + - { "service_tag": "KLBR111", "state": "on" } + - { "service_tag": "KLBR222", "state": "off" } diff --git a/playbooks/ome/powerstate/ome_powerstate_with_job_tracking.yml b/playbooks/ome/powerstate/ome_powerstate_with_job_tracking.yml index 8393992ab..5a27a41c7 100644 --- a/playbooks/ome/powerstate/ome_powerstate_with_job_tracking.yml +++ b/playbooks/ome/powerstate/ome_powerstate_with_job_tracking.yml @@ -2,35 +2,32 @@ - hosts: ome vars: retries_count: 5 - polling_interval: 5 #in seconds + polling_interval: 5 # in seconds connection: local name: "OME - Power state management job tracking." - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - - name: "Power state operation based on device id" - ome_powerstate: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - power_state: "off" - device_id: 11111 - register: result - failed_when: "'job_status' not in result" + - name: Power state operation based on device id + dellemc.openmanage.ome_powerstate: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + power_state: "off" + device_id: 11111 + register: result + failed_when: "'job_status' not in result" - - name: "Get job details using job id from power state operation." - ome_job_info: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - job_id: "{{result.job_status.Id}}" - register: job_result - failed_when: "'job_info' not in job_result" - until: job_result.job_info.LastRunStatus.Name == 'Completed' or job_result.job_info.LastRunStatus.Name == 'Failed' - retries: "{{ retries_count }}" - delay: "{{ polling_interval }}" \ No newline at end of file + - name: Get job details using job id from power state operation. + dellemc.openmanage.ome_job_info: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + job_id: "{{ result.job_status.Id }}" + register: job_result + failed_when: "'job_info' not in job_result" + until: job_result.job_info.LastRunStatus.Name == 'Completed' or job_result.job_info.LastRunStatus.Name == 'Failed' + retries: "{{ retries_count }}" + delay: "{{ polling_interval }}" diff --git a/playbooks/ome/profile/ome_profile.yml b/playbooks/ome/profile/ome_profile.yml index 58a136b2d..0a80f0bf6 100644 --- a/playbooks/ome/profile/ome_profile.yml +++ b/playbooks/ome/profile/ome_profile.yml @@ -2,17 +2,14 @@ - hosts: ome connection: local name: Dell OpenManage Ansible profile operations. - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - name: Create two profiles from a template - ome_profile: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_profile: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" command: create template_name: "template 1" @@ -22,17 +19,17 @@ - create_profile - name: Create profile with NFS share - ome_profile: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_profile: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" command: create template_name: "template 1" name_prefix: "omam_profile" number_of_profiles: 1 boot_to_network_iso: - boot_to_network: True + boot_to_network: true share_type: "NFS" share_ip: "192.168.0.1" iso_path: "/path/to/my_iso.iso" @@ -41,17 +38,17 @@ - create_profile_nfs - name: Create profile with CIFS share - ome_profile: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_profile: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" command: create template_name: "template 1" name_prefix: "omam_profile" number_of_profiles: 1 boot_to_network_iso: - boot_to_network: True + boot_to_network: true share_type: CIFS share_ip: "192.168.0.2" share_user: "username" @@ -63,17 +60,17 @@ - create_profile_cifs - name: Modify profile name with NFS share and attributes - ome_profile: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_profile: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" command: modify name: "Profile 00001" new_name: "modified profile" description: "new description" boot_to_network_iso: - boot_to_network: True + boot_to_network: true share_type: NFS share_ip: "192.168.0.1" iso_path: "/path/to/my_iso.iso" @@ -86,17 +83,17 @@ - Id: 4507 Value: "server attr 2" IsIgnored: true - - DisplayName: 'System, Server Topology, ServerTopology 1 Aisle Name' + - DisplayName: "System, Server Topology, ServerTopology 1 Aisle Name" Value: Aisle 5 IsIgnored: false tags: - modify_profile - name: Delete using profile name - ome_profile: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_profile: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" command: "delete" name: "Profile 00003" @@ -104,23 +101,23 @@ - delete_profile_name - name: Delete using filter - ome_profile: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_profile: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" command: "delete" filters: - SelectAll: True + SelectAll: true Filters: =contains(ProfileName,'Profile 00002') tags: - delete_filter - name: Delete using profile list filter - ome_profile: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_profile: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" command: "delete" filters: @@ -131,16 +128,16 @@ - delete_profile_ids - name: Assign profile name with network share - ome_profile: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_profile: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" command: assign name: "Profile 00001" device_id: 12456 boot_to_network_iso: - boot_to_network: True + boot_to_network: true share_type: NFS share_ip: "192.168.0.1" iso_path: "/path/to/my_iso.iso" @@ -154,18 +151,18 @@ ShutdownType: 0 TimeToWaitBeforeShutdown: 300 EndHostPowerState: 1 - StrictCheckingVlan: True + StrictCheckingVlan: true Schedule: - RunNow: True - RunLater: False + RunNow: true + RunLater: false tags: - assign_profile - name: Unassign using profile name - ome_profile: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_profile: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" command: "unassign" name: "Profile 00003" @@ -173,23 +170,23 @@ - unassign_profile_name - name: "Unassign using filters" - ome_profile: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_profile: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" command: "unassign" filters: - SelectAll: True + SelectAll: true Filters: =contains(ProfileName,'Profile 00003') tags: - unassign_filter - name: Unassign using filter - ome_profile: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_profile: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" command: "unassign" filters: @@ -200,13 +197,13 @@ - unassign_profile_list - name: Migrate profile - ome_profile: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_profile: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" command: "migrate" name: "Profile 0001" device_id: 12456 tags: - - migrate_profile \ No newline at end of file + - migrate_profile diff --git a/playbooks/ome/profile/ome_profile_assign_job_tracking.yml b/playbooks/ome/profile/ome_profile_assign_job_tracking.yml index e5b63a9f0..934b5319a 100644 --- a/playbooks/ome/profile/ome_profile_assign_job_tracking.yml +++ b/playbooks/ome/profile/ome_profile_assign_job_tracking.yml @@ -2,38 +2,43 @@ - hosts: ome connection: local name: Dell OpenManage Ansible profile operations. - gather_facts: False + gather_facts: false vars: retries_count: 120 polling_interval: 30 # 30 seconds x 120 times = 1 hour - failed_states: ['Failed', 'Warning', 'Aborted', 'Paused', 'Stopped', - 'Canceled'] - completed_states: ['Completed', 'Failed', 'Warning', 'Aborted', 'Paused', - 'Stopped', 'Canceled'] - - collections: - - dellemc.openmanage + failed_states: + ["Failed", "Warning", "Aborted", "Paused", "Stopped", "Canceled"] + completed_states: + [ + "Completed", + "Failed", + "Warning", + "Aborted", + "Paused", + "Stopped", + "Canceled", + ] tasks: - name: Assign a profile to target - ome_profile: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_profile: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" command: "assign" name: "Profile 00001" device_id: 12456 register: result - - name: End play when no job_id in result - meta: end_play + - name: End play when no job_id in result # noqa: no-handler + ansible.builtin.meta: end_play when: - - result.changed == false + - not result.changed - "'job_id' not in result" - name: Get job details using job id - ome_job_info: + dellemc.openmanage.ome_job_info: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" diff --git a/playbooks/ome/profile/ome_profile_info.yml b/playbooks/ome/profile/ome_profile_info.yml index cb6a86701..cd055d03e 100644 --- a/playbooks/ome/profile/ome_profile_info.yml +++ b/playbooks/ome/profile/ome_profile_info.yml @@ -2,53 +2,53 @@ - hosts: ome connection: local name: Dell OpenManage Ansible profile info. - gather_facts: False + gather_facts: false tasks: - name: Retrieve all profiles dellemc.openmanage.ome_profile_info: - hostname: "{{ hostname }}" + hostname: "{{ hostname }}" username: "{{ username }}" - password: "{{ password }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" - name: Retrieve profile using the name dellemc.openmanage.ome_profile_info: - hostname: "{{ hostname }}" + hostname: "{{ hostname }}" username: "{{ username }}" - password: "{{ password }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" profile_name: eprof 00001 - name: Retrieve profile using the id dellemc.openmanage.ome_profile_info: - hostname: "{{ hostname }}" + hostname: "{{ hostname }}" username: "{{ username }}" - password: "{{ password }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" profile_id: 10129 - name: Retrieve the profiles using the template name dellemc.openmanage.ome_profile_info: - hostname: "{{ hostname }}" + hostname: "{{ hostname }}" username: "{{ username }}" - password: "{{ password }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" template_name: t2 - name: Retrieve the profiles using the template id dellemc.openmanage.ome_profile_info: - hostname: "{{ hostname }}" + hostname: "{{ hostname }}" username: "{{ username }}" - password: "{{ password }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" template_id: 11 - name: Retrieve the profiles based on odata filters dellemc.openmanage.ome_profile_info: - hostname: "{{ hostname }}" + hostname: "{{ hostname }}" username: "{{ username }}" - password: "{{ password }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" system_query_options: filter: TemplateName eq 'mytemplate' diff --git a/playbooks/ome/profile/ome_profile_migrate_job_tracking.yml b/playbooks/ome/profile/ome_profile_migrate_job_tracking.yml index 61f3e5d9e..510403473 100644 --- a/playbooks/ome/profile/ome_profile_migrate_job_tracking.yml +++ b/playbooks/ome/profile/ome_profile_migrate_job_tracking.yml @@ -2,39 +2,43 @@ - hosts: ome connection: local name: Dell OpenManage Ansible profile operations. - gather_facts: False + gather_facts: false vars: retries_count: 120 polling_interval: 30 # 30 seconds x 120 times = 1 hour - failed_states: ['Failed', 'Warning', 'Aborted', 'Paused', 'Stopped', - 'Canceled'] - completed_states: ['Completed', 'Failed', 'Warning', 'Aborted', 'Paused', - 'Stopped', 'Canceled'] - - collections: - - dellemc.openmanage + failed_states: + ["Failed", "Warning", "Aborted", "Paused", "Stopped", "Canceled"] + completed_states: + [ + "Completed", + "Failed", + "Warning", + "Aborted", + "Paused", + "Stopped", + "Canceled", + ] tasks: - - name: Migrate a profile - ome_profile: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_profile: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" command: "migrate" name: "Profile 00001" device_id: 12456 register: result - - name: End play when no job_id in result - meta: end_play + - name: End play when no job_id in result # noqa: no-handler + ansible.builtin.meta: end_play when: - - result.changed == false + - not result.changed - "'job_id' not in result" - name: Get job details using job id - ome_job_info: + dellemc.openmanage.ome_job_info: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" diff --git a/playbooks/ome/profile/ome_profile_unassign_job_tracking.yml b/playbooks/ome/profile/ome_profile_unassign_job_tracking.yml index e13f54b09..efb68fabd 100644 --- a/playbooks/ome/profile/ome_profile_unassign_job_tracking.yml +++ b/playbooks/ome/profile/ome_profile_unassign_job_tracking.yml @@ -2,38 +2,42 @@ - hosts: ome connection: local name: Dell OpenManage Ansible profile operations. - gather_facts: False + gather_facts: false vars: retries_count: 120 polling_interval: 30 # 30 seconds x 120 times = 1 hour - failed_states: ['Failed', 'Warning', 'Aborted', 'Paused', 'Stopped', - 'Canceled'] - completed_states: ['Completed', 'Failed', 'Warning', 'Aborted', 'Paused', - 'Stopped', 'Canceled'] - - collections: - - dellemc.openmanage + failed_states: + ["Failed", "Warning", "Aborted", "Paused", "Stopped", "Canceled"] + completed_states: + [ + "Completed", + "Failed", + "Warning", + "Aborted", + "Paused", + "Stopped", + "Canceled", + ] tasks: - - name: Unassign using profile name - ome_profile: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_profile: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" command: "unassign" name: "Profile 00003" register: result - - name: End play when no job_id in result - meta: end_play + - name: End play when no job_id in result # noqa: no-handler + ansible.builtin.meta: end_play when: - - result.changed == false + - not result.changed - "'job_id' not in result" - name: Get job details using job id - ome_job_info: + dellemc.openmanage.ome_job_info: hostname: "{{ hostname }}" username: "{{ username }}" password: "{{ password }}" diff --git a/playbooks/ome/template/ome_template.yml b/playbooks/ome/template/ome_template.yml index 58ac15ffb..ebe82ce3a 100644 --- a/playbooks/ome/template/ome_template.yml +++ b/playbooks/ome/template/ome_template.yml @@ -2,28 +2,25 @@ - hosts: ome connection: local name: Dell OpenManage Ansible device Template service. - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - - name: "Create a template from a reference device." - ome_template: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + - name: Create a template from a reference device. + dellemc.openmanage.ome_template: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" device_id: 25123 attributes: Name: "New Template" Description: "New Template description" - - name: "Modify template name, description, and attribute value." - ome_template: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + - name: Modify template name, description, and attribute value. + dellemc.openmanage.ome_template: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" command: "modify" template_id: 12 @@ -39,10 +36,10 @@ IsIgnored: false - name: Modify template name, description, and attribute using detailed view - ome_template: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_template: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" command: "modify" template_id: 12 @@ -52,17 +49,17 @@ Attributes: # Enter the comma separated string as appearing in the Detailed view on GUI # NIC -> NIC.Integrated.1-1-1 -> NIC Configuration -> Wake On LAN1 - - DisplayName: 'NIC, NIC.Integrated.1-1-1, NIC Configuration, Wake On LAN' + - DisplayName: "NIC, NIC.Integrated.1-1-1, NIC Configuration, Wake On LAN" Value: Enabled IsIgnored: false # System -> LCD Configuration -> LCD 1 User Defined String for LCD - - DisplayName: 'System, LCD Configuration, LCD 1 User Defined String for LCD' + - DisplayName: "System, LCD Configuration, LCD 1 User Defined String for LCD" Value: LCD str by OMAM IsIgnored: false - - name: "Deploy template on multiple devices " - ome_template: - hostname: "192.168.0.1" + - name: Deploy template on multiple devices + dellemc.openmanage.ome_template: + hostname: "192.168.0.1" username: "username" password: "password" ca_path: "/path/to/ca_cert.pem" @@ -72,14 +69,14 @@ - 12765 - 10173 device_service_tag: - - 'SVTG123' - - 'SVTG456' + - "SVTG123" + - "SVTG456" - name: Deploy template on groups - ome_template: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_template: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" command: "deploy" template_id: 12 @@ -87,11 +84,11 @@ - server_group_1 - server_group_2 - - name: "Deploy template on multiple devices along attributes modification for target device" - ome_template: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + - name: Deploy template on multiple devices along attributes modification for target device" + dellemc.openmanage.ome_template: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" command: "deploy" template_id: 12 @@ -99,7 +96,7 @@ - 12765 - 10173 device_service_tag: - - 'SVTG123' + - "SVTG123" attributes: # Device specific attributes to be modified during deployment. # For information on any attribute id, use API /TemplateService/Templates(Id)/Views(Id)/AttributeViewDetails @@ -119,18 +116,18 @@ Value: "hostname-1" IsIgnored: false - - name: "Deploy template and Operating System (OS) on multiple devices" - ome_template: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + - name: Deploy template and Operating System (OS) on multiple devices" + dellemc.openmanage.ome_template: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" command: "deploy" template_id: 12 device_id: - 12765 device_service_tag: - - 'SVTG123' + - "SVTG123" attributes: # Include this to install OS on the devices. # This section is optional @@ -152,12 +149,13 @@ RunLater: true RunNow: false - - name: "Deploy template on multiple devices and changes the device-level attributes. After the template is deployed, - install OS using its image." - ome_template: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + - name: + Deploy template on multiple devices and changes the device-level attributes. After the template is deployed, + install OS using its image. + dellemc.openmanage.ome_template: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" command: "deploy" template_id: 12 @@ -165,8 +163,8 @@ - 12765 - 10173 device_service_tag: - - 'SVTG123' - - 'SVTG456' + - "SVTG123" + - "SVTG456" attributes: Attributes: - DeviceId: 12765 @@ -197,59 +195,61 @@ RunLater: true RunNow: false - - name: "delete template" - ome_template: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + - name: Delete template" + dellemc.openmanage.ome_template: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" command: "delete" template_id: 12 - - name: "export a template" - ome_template: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + - name: Export a template + dellemc.openmanage.ome_template: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" command: "export" template_id: 12 # Start of example to export template to a local xml file - - name: "export template to a local xml file" - ome_template: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + - name: Export template to a local xml file + dellemc.openmanage.ome_template: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" command: "export" template_name: "my_template" register: result tags: - export_xml_to_file - - ansible.builtin.copy: - content: "{{ result.Content}}" + - name: Copy Task + ansible.builtin.copy: + content: "{{ result.Content }}" dest: "/path/to/exported_template.xml" + mode: "0600" tags: - export_xml_to_file # End of example to export template to a local xml file - - name: "clone a template" - ome_template: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + - name: Clone a template + dellemc.openmanage.ome_template: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" command: "clone" template_id: 12 attributes: Name: "New Cloned Template Name" - - name: "import template from XML content" - ome_template: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + - name: Import template from XML content + dellemc.openmanage.ome_template: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" command: "import" attributes: @@ -257,19 +257,20 @@ # Template Type from TemplateService/TemplateTypes Type: 2 # xml string content - Content: "\n\nTrue\nClear\n - \n\nReady - \nNo\n\n - \nReady\n - No\n\n\n" + Content: + "\n\nTrue\nClear\n + \n\nReady + \nNo\n\n + \nReady\n + No\n\n\n" - - name: "import template from local XML file" - ome_template: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + - name: Import template from local XML file + dellemc.openmanage.ome_template: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" command: "import" attributes: @@ -277,18 +278,18 @@ Type: 2 Content: "{{ lookup('ansible.builtin.file', '/path/to/xmlfile') }}" - - name: "Deploy template and Operating System (OS) on multiple devices." - ome_template: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + - name: Deploy template and Operating System (OS) on multiple devices." + dellemc.openmanage.ome_template: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" command: "deploy" template_id: 12 device_id: - 12765 device_service_tag: - - 'SVTG123' + - "SVTG123" attributes: # Include this to install OS on the devices. # This section is optional @@ -311,10 +312,10 @@ RunNow: false - name: Create a compliance template from reference device - ome_template: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_template: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" command: "create" device_service_tag: "SVTG123" @@ -325,10 +326,10 @@ Fqdds: "BIOS" - name: Import a compliance template from XML file - ome_template: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_template: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" command: "import" template_view_type: "Compliance" diff --git a/playbooks/ome/template/ome_template_create_modify_lcd_display.yml b/playbooks/ome/template/ome_template_create_modify_lcd_display.yml index 40f4c0027..929a6be94 100644 --- a/playbooks/ome/template/ome_template_create_modify_lcd_display.yml +++ b/playbooks/ome/template/ome_template_create_modify_lcd_display.yml @@ -2,10 +2,10 @@ - hosts: ome connection: local name: "Creates a new template from the provided reference server device. - Track the template creation job till completion. - Fetch the Attribute specific to LCD Configuration settings from the attribute view of the created template. - Modify the created template with the user defined LCD string." - gather_facts: False + Track the template creation job till completion. + Fetch the Attribute specific to LCD Configuration settings from the attribute view of the created template. + Modify the created template with the user defined LCD string." + gather_facts: false vars: retries_count: 50 polling_interval: 5 @@ -13,117 +13,115 @@ template_name: "LCD String Deploy Template" lcd_display_string: "LCD Custom Display Message" - collections: - - dellemc.openmanage - tasks: - - name: "create template from the reference server" - ome_template: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - device_service_tag: "{{ reference_device }}" - attributes: - Name: "{{ template_name }}" - Description: "LCD Template description" - register: result + - name: Create template from the reference server + dellemc.openmanage.ome_template: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + device_service_tag: "{{ reference_device }}" + attributes: + Name: "{{ template_name }}" + Description: "LCD Template description" + register: result + + - name: Sleep for 30 seconds and continue with play + ansible.builtin.wait_for: + timeout: 30 - - name: "sleep for 30 seconds and continue with play" - wait_for: timeout=30 + - name: Fetch the Task ID from the Template Details using the Template ID + dellemc.openmanage.ome_template_info: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + template_id: "{{ result.return_id }}" + register: template_result - - name: "Fetch the Task ID from the Template Details using the Template ID" - ome_template_info: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - template_id: "{{ result.return_id }}" - register: template_result + - name: "Track the Template Creation Job till Completion" + dellemc.openmanage.ome_job_info: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + job_id: "{{ template_result.template_info[hostname].TaskId }}" + register: job_result + failed_when: "'job_info' not in job_result" + until: job_result.job_info.LastRunStatus.Name == 'Completed' or job_result.job_info.LastRunStatus.Name == 'Failed' + retries: "{{ retries_count }}" + delay: "{{ polling_interval }}" - - name: "Track the Template Creation Job till Completion" - ome_job_info: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - job_id: "{{ template_result.template_info[hostname].TaskId }}" - register: job_result - failed_when: "'job_info' not in job_result" - until: job_result.job_info.LastRunStatus.Name == 'Completed' or job_result.job_info.LastRunStatus.Name == 'Failed' - retries: "{{ retries_count }}" - delay: "{{ polling_interval }}" + - name: "Retrieve the Attribute ID specific to LCD Configuration" + ansible.builtin.uri: + url: "https://{{ hostname }}/api/TemplateService/Templates({{ result.return_id }})/Views(1)/AttributeViewDetails" + user: "{{ username }}" + password: "{{ password }}" + method: "GET" + use_proxy: true + status_code: 200 + return_content: true + validate_certs: false + force_basic_auth: true + headers: + Content-Type: "application/json" + Accept: "application/json" + register: config_result - - name: "Retrieve the Attribute ID specific to LCD Configuration" - uri: - url: "https://{{ hostname }}/api/TemplateService/Templates({{ result.return_id }})/Views(1)/AttributeViewDetails" - user: "{{ username }}" - password: "{{ password }}" - method: "GET" - use_proxy: yes - status_code: 200 - return_content: yes - validate_certs: no - force_basic_auth: yes - headers: - Content-Type: "application/json" - Accept: "application/json" - register: config_result + - name: "System Attribute Groups" + ansible.builtin.set_fact: + lcd_fact: "{{ item }}" + when: + - item.DisplayName=='System' + with_items: + - "{{ config_result.json.AttributeGroups }}" + loop_control: + label: "{{ config_result.json.Name }}" - - name: "System Attribute Groups" - set_fact: - lcd_fact: "{{ item }}" - when: - - item.DisplayName=='System' - with_items: - - "{{ config_result.json.AttributeGroups }}" - loop_control: - label: "{{ config_result.json.Name }}" + - name: "LCD System Attributes Groups" + ansible.builtin.set_fact: + lcdconfig: "{{ item }}" + when: + - item.DisplayName=='LCD Configuration' + with_items: + - "{{ lcd_fact.SubAttributeGroups }}" + loop_control: + label: "{{ item.DisplayName }}" - - name: "LCD System Attributes Groups" - set_fact: - lcdconfig: "{{ item }}" - when: - - item.DisplayName=='LCD Configuration' - with_items: - - "{{ lcd_fact.SubAttributeGroups }}" - loop_control: - label: "{{ item.DisplayName }}" + - name: "Retrieve LCD Display Attribute ID" + ansible.builtin.set_fact: + lcdattrid: "{{ item.AttributeId }}" + when: + - item.DisplayName=='LCD 1 User Defined String for LCD' + with_items: + - "{{ lcdconfig.Attributes }}" + loop_control: + label: "{{ item.DisplayName }}" - - name: "Retrieve LCD Display Attribute ID" - set_fact: - lcdattrid: "{{ item.AttributeId }}" - when: - - item.DisplayName=='LCD 1 User Defined String for LCD' - with_items: - - "{{ lcdconfig.Attributes }}" - loop_control: - label: "{{ item.DisplayName }}" - - - name: "Retrieve LCD Config Attribute ID" - set_fact: - lcdconfigattrid: "{{ item.AttributeId }}" - when: - - item.DisplayName=='LCD 1 LCD Configuration' - with_items: - - "{{ lcdconfig.Attributes }}" - loop_control: - label: "{{ item.DisplayName }}" + - name: "Retrieve LCD Config Attribute ID" + ansible.builtin.set_fact: + lcdconfigattrid: "{{ item.AttributeId }}" + when: + - item.DisplayName=='LCD 1 LCD Configuration' + with_items: + - "{{ lcdconfig.Attributes }}" + loop_control: + label: "{{ item.DisplayName }}" - - name: "Modify the created with Custom LCD String to be displayed" - ome_template: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - state: "modify" - template_id: "{{ result.return_id }}" - attributes: - Name: "{{ template_name }}" - Attributes: - - Id: "{{ lcdattrid }}" - Value: "{{ lcd_display_string }}" - IsIgnored: false - - Id: "{{ lcdconfigattrid }}" - Value: "User Defined" - IsIgnored: false \ No newline at end of file + - name: "Modify the created with Custom LCD String to be displayed" + dellemc.openmanage.ome_template: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + state: "modify" + template_id: "{{ result.return_id }}" + attributes: + Name: "{{ template_name }}" + Attributes: + - Id: "{{ lcdattrid }}" + Value: "{{ lcd_display_string }}" + IsIgnored: false + - Id: "{{ lcdconfigattrid }}" + Value: "User Defined" + IsIgnored: false diff --git a/playbooks/ome/template/ome_template_info.yml b/playbooks/ome/template/ome_template_info.yml index 3fd200c00..1ae780512 100644 --- a/playbooks/ome/template/ome_template_info.yml +++ b/playbooks/ome/template/ome_template_info.yml @@ -2,32 +2,29 @@ - hosts: ome connection: local name: Dell OpenManage Ansible template inventory details. - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - name: Retrieve basic details of all templates. - ome_template_info: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_template_info: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" - name: Retrieve details of a specific template identified by its template ID. - ome_template_info: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_template_info: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" - template_id: "{{template_id}}" + template_id: "{{ template_id }}" - name: Get filtered template info based on name. - ome_template_info: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_template_info: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" system_query_options: - filter: "Name eq 'new template'" \ No newline at end of file + filter: "Name eq 'new template'" diff --git a/playbooks/ome/template/ome_template_info_with_filter.yml b/playbooks/ome/template/ome_template_info_with_filter.yml index eb040c9c0..e4daf1745 100644 --- a/playbooks/ome/template/ome_template_info_with_filter.yml +++ b/playbooks/ome/template/ome_template_info_with_filter.yml @@ -2,26 +2,23 @@ - hosts: ome connection: local name: Dell OpenManage Ansible device Template service. - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - - name: get template with filter option. - register: result - failed_when: "'template_info' not in result or result.template_info['{{hostname}}']['@odata.count'] == 0" - ome_template_info: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + - name: Get template with filter option. + register: result + failed_when: "'template_info' not in result or result.template_info['{{ hostname }}']['@odata.count'] == 0" + dellemc.openmanage.ome_template_info: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" system_query_options: - filter: "Name eq 'template_name'" - - name: get specific template from result - with_subelements: + filter: "Name eq 'template_name'" + - name: Get specific template from result + with_subelements: - "{{ result.template_info }}" - value - debug: - msg: "{{item.1}}" - when: item.1['Name']=='template_name' + ansible.builtin.debug: + msg: "{{item.1}}" + when: item.1['Name']=='template_name' diff --git a/playbooks/ome/template/ome_template_lcd_display_string_deploy.yml b/playbooks/ome/template/ome_template_lcd_display_string_deploy.yml index afb472fa4..f0a09983b 100644 --- a/playbooks/ome/template/ome_template_lcd_display_string_deploy.yml +++ b/playbooks/ome/template/ome_template_lcd_display_string_deploy.yml @@ -1,46 +1,42 @@ --- - hosts: ome connection: local - name: - - Deploy this template with desired LCD string on the target servers. - - Track the template deploy operation job till completion. - gather_facts: False + name: "Deploy this template with desired LCD string on the target servers. + Track the template deploy operation job till completion." + gather_facts: false vars: retries_count: 50 polling_interval: 5 template_name: "LCD Srting Deploy Template" deployable_servicetag: - - 'MXL1234' - - 'MXL4567' - - collections: - - dellemc.openmanage + - "MXL1234" + - "MXL4567" tasks: - - name: "Deploy Previously created LCD Template " - ome_template: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - state: "deploy" - template_name: "{{ template_name }}" - device_service_tag: "{{ deployable_servicetag }}" - register: result - tags: - - deploy + - name: Deploy Previously created LCD Template + dellemc.openmanage.ome_template: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + state: "deploy" + template_name: "{{ template_name }}" + device_service_tag: "{{ deployable_servicetag }}" + register: result + tags: + - deploy - - name: "Track the deploy job till completion" - ome_job_info: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - job_id: "{{ result.return_id }}" - register: job_result - failed_when: "'job_info' not in job_result" - until: job_result.job_info.LastRunStatus.Name == 'Completed' or job_result.job_info.LastRunStatus.Name == 'Failed' - retries: "{{ retries_count }}" - delay: "{{ polling_interval }}" - tags: - - track_deploy \ No newline at end of file + - name: Track the deploy job till completion + dellemc.openmanage.ome_job_info: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + job_id: "{{ result.return_id }}" + register: job_result + failed_when: "'job_info' not in job_result" + until: job_result.job_info.LastRunStatus.Name == 'Completed' or job_result.job_info.LastRunStatus.Name == 'Failed' + retries: "{{ retries_count }}" + delay: "{{ polling_interval }}" + tags: + - track_deploy diff --git a/playbooks/ome/template/ome_template_network_vlan.yml b/playbooks/ome/template/ome_template_network_vlan.yml index fee07b4e2..07e0380ef 100644 --- a/playbooks/ome/template/ome_template_network_vlan.yml +++ b/playbooks/ome/template/ome_template_network_vlan.yml @@ -2,65 +2,62 @@ - hosts: ome connection: local name: Dell OpenManage Ansible template tag and untag. - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - - name: Tag or untag vlans in template - ome_template_network_vlan: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - template_id: 78 - nic_identifier: NIC Slot 4 - untagged_networks: - - port: 1 - untagged_network_id: 12765 - - port: 2 - untagged_network_name: vlan2 - tagged_networks: - - port: 1 - tagged_network_ids: - - 12767 - - 12768 - - port: 4 - tagged_network_ids: - - 12767 - - 12768 - tagged_network_names: - - vlan3 - - port: 2 - tagged_network_names: - - vlan4 - - vlan1 - tags: - - tag_untag_vlan + - name: Tag or untag vlans in template + dellemc.openmanage.ome_template_network_vlan: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + template_id: 78 + nic_identifier: NIC Slot 4 + untagged_networks: + - port: 1 + untagged_network_id: 12765 + - port: 2 + untagged_network_name: vlan2 + tagged_networks: + - port: 1 + tagged_network_ids: + - 12767 + - 12768 + - port: 4 + tagged_network_ids: + - 12767 + - 12768 + tagged_network_names: + - vlan3 + - port: 2 + tagged_network_names: + - vlan4 + - vlan1 + tags: + - tag_untag_vlan - - name: Clear the tagged and untagged vLANs - ome_template_network_vlan: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - template_id: 78 - nic_identifier: NIC Slot 4 - untagged_networks: - # For removing the untagged vLANs for the port 1 and 2 - - port: 1 - untagged_network_id: 0 - - port: 2 - untagged_network_name: 0 - tagged_networks: - # For removing the tagged vLANs for port 1 and 4 - - port: 1 - tagged_network_ids: [] - - port: 4 - tagged_network_ids: [] - tagged_network_names: [] - - port: 2 - tagged_network_names: [] - tags: - - clear_tagged_untagged \ No newline at end of file + - name: Clear the tagged and untagged vLANs + dellemc.openmanage.ome_template_network_vlan: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + template_id: 78 + nic_identifier: NIC Slot 4 + untagged_networks: + # For removing the untagged vLANs for the port 1 and 2 + - port: 1 + untagged_network_id: 0 + - port: 2 + untagged_network_name: 0 + tagged_networks: + # For removing the tagged vLANs for port 1 and 4 + - port: 1 + tagged_network_ids: [] + - port: 4 + tagged_network_ids: [] + tagged_network_names: [] + - port: 2 + tagged_network_names: [] + tags: + - clear_tagged_untagged diff --git a/playbooks/ome/template/ome_template_network_vlan_info.yml b/playbooks/ome/template/ome_template_network_vlan_info.yml index 1f3d1ccb0..672988844 100644 --- a/playbooks/ome/template/ome_template_network_vlan_info.yml +++ b/playbooks/ome/template/ome_template_network_vlan_info.yml @@ -2,28 +2,28 @@ - hosts: ome connection: local name: Dell OpenManage Ansible template VLAN info. - gather_facts: False + gather_facts: false tasks: - name: Retrieve network details of all templates. dellemc.openmanage.ome_template_network_vlan_info: - hostname: "{{ hostname }}" + hostname: "{{ hostname }}" username: "{{ username }}" - password: "{{ password }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" - name: Retrieve network details using template ID dellemc.openmanage.ome_template_network_vlan_info: - hostname: "{{ hostname }}" + hostname: "{{ hostname }}" username: "{{ username }}" - password: "{{ password }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" template_id: 1234 - name: Retrieve network details using template name dellemc.openmanage.ome_template_network_vlan_info: - hostname: "{{ hostname }}" + hostname: "{{ hostname }}" username: "{{ username }}" - password: "{{ password }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" template_name: template1 diff --git a/playbooks/ome/template/ome_template_with_job_tracking.yml b/playbooks/ome/template/ome_template_with_job_tracking.yml index 9f93bbdfb..64d0721b7 100644 --- a/playbooks/ome/template/ome_template_with_job_tracking.yml +++ b/playbooks/ome/template/ome_template_with_job_tracking.yml @@ -2,47 +2,44 @@ - hosts: ome vars: retries_count: 50 - polling_interval: 5 #in seconds + polling_interval: 5 # in seconds connection: local name: "OME - Create Template details tracking" - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - - name: "Create template based on device id." - ome_template: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - device_id: 12475 - attributes: - Name: "New Template" - Description: "New Template description" - register: result - failed_when: "'return_id' not in result" + - name: "Create template based on device id." + dellemc.openmanage.ome_template: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + device_id: 12475 + attributes: + Name: "New Template" + Description: "New Template description" + register: result + failed_when: "'return_id' not in result" - - name: "Get the job id using return id from template." - ome_template_info: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - template_id: "{{ result.return_id }}" - register: facts_result + - name: "Get the job id using return id from template." + dellemc.openmanage.ome_template_info: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + template_id: "{{ result.return_id }}" + register: facts_result - - name: "Get job details using job id from template task." - ome_job_info: - hostname: "{{ hostname }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - job_id: "{{ facts_result.template_info[hostname].TaskId }}" - register: job_result - failed_when: job_result.job_info.LastRunStatus.Name == 'Failed' - changed_when: job_result.job_info.LastRunStatus.Name == 'Completed' - until: job_result.job_info.LastRunStatus.Name == 'Completed' or job_result.job_info.LastRunStatus.Name == 'Failed' - retries: "{{ retries_count }}" - delay: "{{ polling_interval }}" + - name: "Get job details using job id from template task." + dellemc.openmanage.ome_job_info: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + job_id: "{{ facts_result.template_info[hostname].TaskId }}" + register: job_result + failed_when: job_result.job_info.LastRunStatus.Name == 'Failed' + changed_when: job_result.job_info.LastRunStatus.Name == 'Completed' + until: job_result.job_info.LastRunStatus.Name == 'Completed' or job_result.job_info.LastRunStatus.Name == 'Failed' + retries: "{{ retries_count }}" + delay: "{{ polling_interval }}" diff --git a/playbooks/ome/user/ome_user.yml b/playbooks/ome/user/ome_user.yml index b1589caea..3f6b45ebf 100644 --- a/playbooks/ome/user/ome_user.yml +++ b/playbooks/ome/user/ome_user.yml @@ -2,69 +2,66 @@ - hosts: ome connection: local name: Dell OpenManage Ansible User service. - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - - name: create new user. - ome_user: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + - name: Create new user. + dellemc.openmanage.ome_user: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" attributes: - UserName: "user1" - Password: "UserPassword" - RoleId: "10" - Enabled: True - - - name: create user with all parameters - ome_user: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + UserName: "user1" + Password: "UserPassword" + RoleId: "10" + Enabled: true + + - name: Create user with all parameters + dellemc.openmanage.ome_user: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" state: "present" attributes: - UserName: "user2" - Description: "user2 description" - Password: "UserPassword" - RoleId: "10" - Enabled: True - DirectoryServiceId: 0 - UserTypeId: 1 - Locked: False - Name: "user2" + UserName: "user2" + Description: "user2 description" + Password: "UserPassword" + RoleId: "10" + Enabled: true + DirectoryServiceId: 0 + UserTypeId: 1 + Locked: false + Name: "user2" - - name: modify existing user - ome_user: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + - name: Modify existing user + dellemc.openmanage.ome_user: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" state: "present" attributes: - UserName: "user3" - RoleId: "10" - Enabled: True - Description: "Modify user Description" + UserName: "user3" + RoleId: "10" + Enabled: true + Description: "Modify user Description" - - name: delete existing user using id. - ome_user: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + - name: Delete existing user using id. + dellemc.openmanage.ome_user: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" state: "absent" user_id: 61874 - - - name: delete existing user using name. - ome_user: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + + - name: Delete existing user using name. + dellemc.openmanage.ome_user: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" state: "absent" - name: "name" \ No newline at end of file + name: "name" diff --git a/playbooks/ome/user/ome_user_info.yml b/playbooks/ome/user/ome_user_info.yml index 6016d5025..494f24cc5 100644 --- a/playbooks/ome/user/ome_user_info.yml +++ b/playbooks/ome/user/ome_user_info.yml @@ -2,32 +2,29 @@ - hosts: ome connection: local name: Fetching ome user facts. - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - name: Retrieve basic details of all accounts. - ome_user_info: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_user_info: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" - name: Retrieve details of a specific account identified by its account ID. - ome_user_info: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_user_info: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" - account_id: "{{account_id}}" - + account_id: "{{ account_id }}" + - name: Retrieve details of a specific user using filter with UserName. - ome_user_info: - hostname: "{{hostname}}" - username: "{{username}}" - password: "{{password}}" + dellemc.openmanage.ome_user_info: + hostname: "{{ hostname }}" + username: "{{ username }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" system_query_options: - filter: "UserName eq 'test'" \ No newline at end of file + filter: "UserName eq 'test'" diff --git a/playbooks/redfish/firmware/redfish_firmware.yml b/playbooks/redfish/firmware/redfish_firmware.yml index 15fa188dd..a6c465812 100644 --- a/playbooks/redfish/firmware/redfish_firmware.yml +++ b/playbooks/redfish/firmware/redfish_firmware.yml @@ -4,29 +4,23 @@ gather_facts: false name: "Ansible Module for Simple Firmware Update" - collections: - - dellemc.openmanage - tasks: - - - name: "Update the firmware from a single executable file available in a local path" - redfish_firmware: + - name: Update the firmware from a single executable file available in a local path + dellemc.openmanage.redfish_firmware: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" image_uri: "/home/firmware_repo/component.exe" - tags: - local-update - - name: "Update the firmware from a single executable file available in a HTTP protocol" - redfish_firmware: + - name: Update the firmware from a single executable file available in a HTTP protocol + dellemc.openmanage.redfish_firmware: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" image_uri: "http://192.168.0.1/firmware_repo/component.exe" - tags: - http-update diff --git a/playbooks/redfish/firmware/redfish_firmware_from_http_jobtracking.yml b/playbooks/redfish/firmware/redfish_firmware_from_http_jobtracking.yml index 105f4189a..a89766d46 100644 --- a/playbooks/redfish/firmware/redfish_firmware_from_http_jobtracking.yml +++ b/playbooks/redfish/firmware/redfish_firmware_from_http_jobtracking.yml @@ -2,19 +2,15 @@ - hosts: redfish_hosts connection: local gather_facts: false - name: "Ansible Module for Simple Firmware Update" + name: Ansible Module for Simple Firmware Update vars: retries_count: 100 polling_interval: 5 reboot_uri: "/redfish/v1/Systems/System.Embedded.1/Actions/ComputerSystem.Reset" - collections: - - dellemc.openmanage - tasks: - - - name: "Update the firmware from a single executable file available in a HTTP protocol" - redfish_firmware: + - name: Update the firmware from a single executable file available in a HTTP protocol + dellemc.openmanage.redfish_firmware: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" @@ -22,17 +18,17 @@ image_uri: "http://192.168.0.1/firmware_repo/component.exe" register: result - - name: "Update the firmware from a single executable with job tracking till completion" - uri: + - name: Update the firmware from a single executable with job tracking till completion + 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" @@ -41,19 +37,19 @@ retries: "{{ retries_count }}" delay: "{{ polling_interval }}" - - name: "Update the firmware from a single executable reboot." - uri: + - name: Update the firmware from a single executable reboot. + ansible.builtin.uri: url: "https://{{ baseuri }}{{ reboot_uri }}" user: "{{ username }}" password: "{{ password }}" method: "POST" body_format: raw body: '{"ResetType": "ForceRestart"}' - use_proxy: yes + use_proxy: true status_code: 204 - return_content: no - validate_certs: no - force_basic_auth: yes + return_content: false + validate_certs: false + force_basic_auth: true headers: Content-Type: "application/json" Accept: "application/json" @@ -61,22 +57,22 @@ changed_when: reboot_result.status == 204 when: job_result.json.TaskState == 'Pending' and job_result.json.Messages.0.Message == 'Task successfully scheduled.' - - name: "Update the firmware from a single executable Waits for 4 minutes." - wait_for: + - name: Update the firmware from a single executable Waits for 4 minutes. + ansible.builtin.wait_for: timeout: 240 when: job_result.json.TaskState == 'Pending' and job_result.json.Messages.0.Message == 'Task successfully scheduled.' - - name: "Update the firmware from a single executable with job tracking till completion." - uri: + - name: Update the firmware from a single executable with job tracking till completion. + 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" @@ -85,8 +81,8 @@ retries: "{{ retries_count }}" delay: "{{ polling_interval }}" - - name: "Update the firmware from a single executable fact." - set_fact: + - name: Update the firmware from a single executable fact. + ansible.builtin.set_fact: job_details: "{{ final_result.json }}" failed_when: final_result.json.TaskState == "Completed" and final_result.json.TaskStatus != "OK" - changed_when: final_result.json.TaskState == "Completed" and final_result.json.TaskStatus == "OK" \ No newline at end of file + changed_when: final_result.json.TaskState == "Completed" and final_result.json.TaskStatus == "OK" diff --git a/playbooks/redfish/firmware/redfish_firmware_from_local_jobtracking.yml b/playbooks/redfish/firmware/redfish_firmware_from_local_jobtracking.yml index 8ea91cc3a..2d843b820 100644 --- a/playbooks/redfish/firmware/redfish_firmware_from_local_jobtracking.yml +++ b/playbooks/redfish/firmware/redfish_firmware_from_local_jobtracking.yml @@ -8,13 +8,9 @@ polling_interval: 5 reboot_uri: "/redfish/v1/Systems/System.Embedded.1/Actions/ComputerSystem.Reset" - collections: - - dellemc.openmanage - tasks: - - - name: "Update the firmware from a single executable file available in a local path" - redfish_firmware: + - name: Update the firmware from a single executable file available in a local path + dellemc.openmanage.redfish_firmware: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" @@ -22,17 +18,17 @@ image_uri: "/home/firmware_repo/component.exe" register: result - - name: "Update the firmware from a single executable with job tracking till completion." - uri: + - name: Update the firmware from a single executable with job tracking till completion. + 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" @@ -41,19 +37,19 @@ retries: "{{ retries_count }}" delay: "{{ polling_interval }}" - - name: "Update the firmware from a single executable reboot." - uri: + - name: Update the firmware from a single executable reboot. + ansible.builtin.uri: url: "https://{{ baseuri }}{{ reboot_uri }}" user: "{{ username }}" password: "{{ password }}" method: "POST" body_format: raw body: '{"ResetType": "ForceRestart"}' - use_proxy: yes + use_proxy: true status_code: 204 - return_content: no - validate_certs: no - force_basic_auth: yes + return_content: false + validate_certs: false + force_basic_auth: true headers: Content-Type: "application/json" Accept: "application/json" @@ -61,22 +57,22 @@ changed_when: reboot_result.status == 204 when: job_result.json.TaskState == 'Pending' and job_result.json.Messages.0.Message == 'Task successfully scheduled.' - - name: "Update the firmware from a single executable Waits for 4 minutes." - wait_for: + - name: Update the firmware from a single executable Waits for 4 minutes. + ansible.builtin.wait_for: timeout: 240 when: job_result.json.TaskState == 'Pending' and job_result.json.Messages.0.Message == 'Task successfully scheduled.' - - name: "Update the firmware from a single executable with job tracking till completion." - uri: + - name: Update the firmware from a single executable with job tracking till completion. + 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" @@ -85,8 +81,8 @@ retries: "{{ retries_count }}" delay: "{{ polling_interval }}" - - name: "Update the firmware from a single executable fact." - set_fact: + - name: Update the firmware from a single executable fact. + ansible.builtin.set_fact: job_details: "{{ final_result.json }}" failed_when: final_result.json.TaskState == "Completed" and final_result.json.TaskStatus != "OK" - changed_when: final_result.json.TaskState == "Completed" and final_result.json.TaskStatus == "OK" \ No newline at end of file + changed_when: final_result.json.TaskState == "Completed" and final_result.json.TaskStatus == "OK" diff --git a/playbooks/redfish/redfish_event_subscription.yml b/playbooks/redfish/redfish_event_subscription.yml index 7fa5e40cc..26d17c271 100644 --- a/playbooks/redfish/redfish_event_subscription.yml +++ b/playbooks/redfish/redfish_event_subscription.yml @@ -2,45 +2,39 @@ - hosts: redfish connection: local name: Configure Redfish subscriptions - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - name: Add Redfish metric subscription - redfish_event_subscription: - baseuri: "{{ baseuri }}" + dellemc.openmanage.redfish_event_subscription: + baseuri: "{{ baseuri }}" username: "{{ username }}" - password: "{{ password }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" destination: "https://192.168.1.100:8188" event_type: MetricReport event_format_type: MetricReport state: present - tags: add_metric_subscription - name: Add Redfish alert subscription - redfish_event_subscription: - baseuri: "{{ baseuri }}" + dellemc.openmanage.redfish_event_subscription: + baseuri: "{{ baseuri }}" username: "{{ username }}" - password: "{{ password }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" destination: "https://server01.example.com:8188" event_type: Alert event_format_type: Event state: present - tags: add_alert_subscription - + - name: Delete Redfish subscription with a specified destination - redfish_event_subscription: - baseuri: "{{ baseuri }}" + dellemc.openmanage.redfish_event_subscription: + baseuri: "{{ baseuri }}" username: "{{ username }}" - password: "{{ password }}" + password: "{{ password }}" ca_path: "/path/to/ca_cert.pem" destination: "https://server01.example.com:8188" state: absent - - tags: delete_subscription \ No newline at end of file + tags: delete_subscription diff --git a/playbooks/redfish/redfish_powerstate.yml b/playbooks/redfish/redfish_powerstate.yml index bacce0ccb..cff91d933 100644 --- a/playbooks/redfish/redfish_powerstate.yml +++ b/playbooks/redfish/redfish_powerstate.yml @@ -2,25 +2,22 @@ - hosts: redfish connection: local name: Configure Server Power Setting - gather_facts: False - - collections: - - dellemc.openmanage + gather_facts: false tasks: - - name: Manage power state of the first device. - redfish_powerstate: - baseuri: "{{ baseuri }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - reset_type: "On" + - name: Manage power state of the first device. + dellemc.openmanage.redfish_powerstate: + baseuri: "{{ baseuri }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + reset_type: "On" - - name: Manage power state of a specified device. - redfish_powerstate: - baseuri: "{{ baseuri }}" - username: "{{ username }}" - password: "{{ password }}" - ca_path: "/path/to/ca_cert.pem" - reset_type: "ForceOff" - resource_id: "System.Embedded.1" + - name: Manage power state of a specified device. + dellemc.openmanage.redfish_powerstate: + baseuri: "{{ baseuri }}" + username: "{{ username }}" + password: "{{ password }}" + ca_path: "/path/to/ca_cert.pem" + reset_type: "ForceOff" + resource_id: "System.Embedded.1" diff --git a/playbooks/redfish/storage/redfish_storage_volume.yml b/playbooks/redfish/storage/redfish_storage_volume.yml index 0c1380a05..ce6d4c13c 100644 --- a/playbooks/redfish/storage/redfish_storage_volume.yml +++ b/playbooks/redfish/storage/redfish_storage_volume.yml @@ -7,13 +7,9 @@ retries_count: 15 polling_interval: 5 - collections: - - dellemc.openmanage - tasks: - - name: Create a volume with supported options. - redfish_storage_volume: + dellemc.openmanage.redfish_storage_volume: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" @@ -33,9 +29,9 @@ register: result tags: - create_volume1 - + - name: Create a volume with minimum options. - redfish_storage_volume: + dellemc.openmanage.redfish_storage_volume: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" @@ -44,12 +40,12 @@ controller_id: "RAID.Slot.1-1" volume_type: "NonRedundant" drives: - - Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1 - tags: - - create_volume2 + - Disk.Bay.1:Enclosure.Internal.0-1:RAID.Slot.1-1 + tags: + - create_volume2 - name: Modify a volume's encryption type settings. - redfish_storage_volume: + dellemc.openmanage.redfish_storage_volume: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" @@ -60,9 +56,9 @@ encrypted: true tags: - modify_volume - + - name: Initialize an existing volume. - redfish_storage_volume: + dellemc.openmanage.redfish_storage_volume: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" @@ -72,9 +68,9 @@ initialize_type: "Slow" tags: - initialize_volume - + - name: Delete an existing volume. - redfish_storage_volume: + dellemc.openmanage.redfish_storage_volume: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" diff --git a/playbooks/redfish/storage/redfish_storage_volume_create_job_tracking.yml b/playbooks/redfish/storage/redfish_storage_volume_create_job_tracking.yml index fcf596cd0..10f02bbb5 100644 --- a/playbooks/redfish/storage/redfish_storage_volume_create_job_tracking.yml +++ b/playbooks/redfish/storage/redfish_storage_volume_create_job_tracking.yml @@ -8,12 +8,9 @@ polling_interval: 10 reboot_uri: "/redfish/v1/Systems/System.Embedded.1/Actions/ComputerSystem.Reset" - collections: - - dellemc.openmanage - tasks: - - name: "Create a storage volume" - redfish_storage_volume: + - name: Create a storage volume" + dellemc.openmanage.redfish_storage_volume: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" @@ -30,17 +27,17 @@ tags: - create_volume - - name: "View the job details to track the status of the create storage volume task" - uri: + - name: View the job details to track the status of the create storage volume task" + 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" @@ -51,38 +48,38 @@ delay: "{{ polling_interval }}" tags: - job-tracking - - - name: "Reboot the system if the job status is pending." - uri: + + - name: Reboot the system if the job status is pending." + ansible.builtin.uri: url: "https://{{ baseuri }}{{ reboot_uri }}" user: "{{ username }}" password: "{{ password }}" method: "POST" body_format: raw body: '{"ResetType": "ForceRestart"}' - use_proxy: yes + use_proxy: true status_code: 204 - return_content: no - validate_certs: no - force_basic_auth: yes + return_content: false + validate_certs: false + force_basic_auth: true headers: Content-Type: "application/json" Accept: "application/json" - register: reboot_result - changed_when: reboot_result.status == 204 + register: reboot_result + changed_when: reboot_result.status == 204 when: job_result.json.TaskState == 'Pending' and job_result.json.Messages.0.Message == 'Task successfully scheduled.' - - name: "View the job details to verify if the task status is completed." - uri: + - name: View the job details to verify if the task status is completed." + 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" diff --git a/playbooks/redfish/storage/redfish_storage_volume_delete_job_tracking.yml b/playbooks/redfish/storage/redfish_storage_volume_delete_job_tracking.yml index 34a821d75..4a83cea5b 100644 --- a/playbooks/redfish/storage/redfish_storage_volume_delete_job_tracking.yml +++ b/playbooks/redfish/storage/redfish_storage_volume_delete_job_tracking.yml @@ -8,12 +8,9 @@ polling_interval: 10 reboot_uri: "/redfish/v1/Systems/System.Embedded.1/Actions/ComputerSystem.Reset" - collections: - - dellemc.openmanage - tasks: - - name: "Delete an existing volume." - redfish_storage_volume: + - name: Delete an existing volume. + dellemc.openmanage.redfish_storage_volume: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" @@ -24,17 +21,17 @@ tags: - delete_volume - - name: "View the job details to track the status of the delete storage volume task" - uri: + - name: View the job details to track the status of the delete storage volume task + 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" @@ -45,38 +42,38 @@ delay: "{{ polling_interval }}" tags: - job-tracking - - - name: "Reboot the system if the job status is pending." - uri: + + - name: Reboot the system if the job status is pending. + ansible.builtin.uri: url: "https://{{ baseuri }}{{ reboot_uri }}" user: "{{ username }}" password: "{{ password }}" method: "POST" body_format: raw body: '{"ResetType": "ForceRestart"}' - use_proxy: yes + use_proxy: true status_code: 204 - return_content: no - validate_certs: no - force_basic_auth: yes + return_content: false + validate_certs: false + force_basic_auth: true headers: Content-Type: "application/json" Accept: "application/json" - register: reboot_result - changed_when: reboot_result.status == 204 + register: reboot_result + changed_when: reboot_result.status == 204 when: job_result.json.TaskState == 'Pending' and job_result.json.Messages.0.Message == 'Task successfully scheduled.' - - name: "View the job details to verify if the task status is completed." - uri: + - name: View the job details to verify if the task status is completed. + 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" diff --git a/playbooks/redfish/storage/redfish_storage_volume_initialize_job_tracking.yml b/playbooks/redfish/storage/redfish_storage_volume_initialize_job_tracking.yml index fb79a2885..4510a984f 100644 --- a/playbooks/redfish/storage/redfish_storage_volume_initialize_job_tracking.yml +++ b/playbooks/redfish/storage/redfish_storage_volume_initialize_job_tracking.yml @@ -8,12 +8,9 @@ polling_interval: 10 reboot_uri: "/redfish/v1/Systems/System.Embedded.1/Actions/ComputerSystem.Reset" - collections: - - dellemc.openmanage - tasks: - - name: "Initialize an existing volume." - redfish_storage_volume: + - name: Initialize an existing volume. + dellemc.openmanage.redfish_storage_volume: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" @@ -25,17 +22,17 @@ tags: - initialize_volume - - name: "View the job details to track the status of the initialization task" - uri: + - name: View the job details to track the status of the initialization task + 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" @@ -46,38 +43,38 @@ delay: "{{ polling_interval }}" tags: - job-tracking - - - name: "Reboot the system if the job status is pending." - uri: + + - name: Reboot the system if the job status is pending. + ansible.builtin.uri: url: "https://{{ baseuri }}{{ reboot_uri }}" user: "{{ username }}" password: "{{ password }}" method: "POST" body_format: raw body: '{"ResetType": "ForceRestart"}' - use_proxy: yes + use_proxy: true status_code: 204 - return_content: no - validate_certs: no - force_basic_auth: yes + return_content: false + validate_certs: false + force_basic_auth: true headers: Content-Type: "application/json" Accept: "application/json" - register: reboot_result - changed_when: reboot_result.status == 204 + register: reboot_result + changed_when: reboot_result.status == 204 when: job_result.json.TaskState == 'Pending' and job_result.json.Messages.0.Message == 'Task successfully scheduled.' - - name: "View the job details to verify if the task status is completed." - uri: + - name: View the job details to verify if the task status is completed. + 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" diff --git a/playbooks/redfish/storage/redfish_storage_volume_modify_job_tracking.yml b/playbooks/redfish/storage/redfish_storage_volume_modify_job_tracking.yml index 02bbc19d1..d01bd2610 100644 --- a/playbooks/redfish/storage/redfish_storage_volume_modify_job_tracking.yml +++ b/playbooks/redfish/storage/redfish_storage_volume_modify_job_tracking.yml @@ -8,12 +8,9 @@ polling_interval: 10 reboot_uri: "/redfish/v1/Systems/System.Embedded.1/Actions/ComputerSystem.Reset" - collections: - - dellemc.openmanage - tasks: - - name: "Modify storage volume encryption settings." - redfish_storage_volume: + - name: Modify storage volume encryption settings. + dellemc.openmanage.redfish_storage_volume: baseuri: "{{ baseuri }}" username: "{{ username }}" password: "{{ password }}" @@ -26,17 +23,17 @@ tags: - modify_volume - - name: "View the job details to track the status of the modify storage volume encryption task" - uri: + - name: View the job details to track the status of the modify storage volume encryption task + 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" @@ -47,38 +44,38 @@ delay: "{{ polling_interval }}" tags: - job-tracking - - - name: "Reboot the system if the job status is pending." - uri: + + - name: Reboot the system if the job status is pending. + ansible.builtin.uri: url: "https://{{ baseuri }}{{ reboot_uri }}" user: "{{ username }}" password: "{{ password }}" method: "POST" body_format: raw body: '{"ResetType": "ForceRestart"}' - use_proxy: yes + use_proxy: true status_code: 204 - return_content: no - validate_certs: no - force_basic_auth: yes + return_content: false + validate_certs: false + force_basic_auth: true headers: Content-Type: "application/json" Accept: "application/json" - register: reboot_result - changed_when: reboot_result.status == 204 + register: reboot_result + changed_when: reboot_result.status == 204 when: job_result.json.TaskState == 'Pending' and job_result.json.Messages.0.Message == 'Task successfully scheduled.' - - name: "View the job details to verify if the task status is completed." - uri: + - name: View the job details to verify if the task status is completed. + 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" diff --git a/plugins/module_utils/idrac_redfish.py b/plugins/module_utils/idrac_redfish.py index 7e523c681..771734996 100644 --- a/plugins/module_utils/idrac_redfish.py +++ b/plugins/module_utils/idrac_redfish.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- # Dell OpenManage Ansible Modules -# Version 7.1.0 -# Copyright (C) 2019-2022 Dell Inc. or its subsidiaries. All Rights Reserved. +# Version 7.3.0 +# Copyright (C) 2019-2023 Dell Inc. or its subsidiaries. All Rights Reserved. # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: @@ -263,7 +263,7 @@ def wait_for_job_completion(self, job_uri, job_wait=False, reboot=False, apply_u return response def export_scp(self, export_format=None, export_use=None, target=None, - job_wait=False, share=None): + job_wait=False, share=None, include_in_export="Default"): """ This method exports system configuration details from the system. :param export_format: XML or JSON. @@ -288,6 +288,21 @@ def export_scp(self, export_format=None, export_use=None, target=None, payload["ShareParameters"]["Username"] = share["username"] if share.get("password") is not None: payload["ShareParameters"]["Password"] = share["password"] + if share.get("ignore_certificate_warning") is not None: + payload["ShareParameters"]["IgnoreCertificateWarning"] = share["ignore_certificate_warning"] + if share.get("proxy_support") is not None: + payload["ShareParameters"]["ProxySupport"] = share["proxy_support"] + if share.get("proxy_type") is not None: + payload["ShareParameters"]["ProxyType"] = share["proxy_type"] + if share.get("proxy_port") is not None: + payload["ShareParameters"]["ProxyPort"] = share["proxy_port"] + if share.get("proxy_server") is not None: + payload["ShareParameters"]["ProxyServer"] = share["proxy_server"] + if share.get("proxy_username") is not None: + payload["ShareParameters"]["ProxyUserName"] = share["proxy_username"] + if share.get("proxy_password") is not None: + payload["ShareParameters"]["ProxyPassword"] = share["proxy_password"] + payload["IncludeInExport"] = include_in_export response = self.invoke_request(EXPORT_URI, "POST", data=payload) if response.status_code == 202 and job_wait: task_uri = response.headers["Location"] @@ -324,6 +339,20 @@ def import_scp_share(self, shutdown_type=None, host_powerstate=None, job_wait=Tr payload["ShareParameters"]["Username"] = share["username"] if share.get("password") is not None: payload["ShareParameters"]["Password"] = share["password"] + if share.get("ignore_certificate_warning") is not None: + payload["ShareParameters"]["IgnoreCertificateWarning"] = share["ignore_certificate_warning"] + if share.get("proxy_support") is not None: + payload["ShareParameters"]["ProxySupport"] = share["proxy_support"] + if share.get("proxy_type") is not None: + payload["ShareParameters"]["ProxyType"] = share["proxy_type"] + if share.get("proxy_port") is not None: + payload["ShareParameters"]["ProxyPort"] = share["proxy_port"] + if share.get("proxy_server") is not None: + payload["ShareParameters"]["ProxyServer"] = share["proxy_server"] + if share.get("proxy_username") is not None: + payload["ShareParameters"]["ProxyUserName"] = share["proxy_username"] + if share.get("proxy_password") is not None: + payload["ShareParameters"]["ProxyPassword"] = share["proxy_password"] response = self.invoke_request(IMPORT_URI, "POST", data=payload) if response.status_code == 202 and job_wait: task_uri = response.headers["Location"] @@ -348,6 +377,20 @@ def import_preview(self, import_buffer=None, target=None, share=None, job_wait=F payload["ShareParameters"]["Username"] = share["username"] if share.get("password") is not None: payload["ShareParameters"]["Password"] = share["password"] + if share.get("ignore_certificate_warning") is not None: + payload["ShareParameters"]["IgnoreCertificateWarning"] = share["ignore_certificate_warning"] + if share.get("proxy_support") is not None: + payload["ShareParameters"]["ProxySupport"] = share["proxy_support"] + if share.get("proxy_type") is not None: + payload["ShareParameters"]["ProxyType"] = share["proxy_type"] + if share.get("proxy_port") is not None: + payload["ShareParameters"]["ProxyPort"] = share["proxy_port"] + if share.get("proxy_server") is not None: + payload["ShareParameters"]["ProxyServer"] = share["proxy_server"] + if share.get("proxy_username") is not None: + payload["ShareParameters"]["ProxyUserName"] = share["proxy_username"] + if share.get("proxy_password") is not None: + payload["ShareParameters"]["ProxyPassword"] = share["proxy_password"] response = self.invoke_request(IMPORT_PREVIEW, "POST", data=payload) if response.status_code == 202 and job_wait: task_uri = response.headers["Location"] @@ -369,6 +412,21 @@ def import_scp(self, import_buffer=None, target=None, job_wait=False): response = self.wait_for_job_complete(task_uri, job_wait=job_wait) return response + def import_preview_scp(self, import_buffer=None, target=None, job_wait=False): + """ + This method imports preview system configuration details to the system. + :param import_buffer: import buffer payload content xml or json format + :param target: IDRAC or NIC or ALL or BIOS or RAID. + :param job_wait: True or False decide whether to wait till the job completion. + :return: json response + """ + payload = {"ImportBuffer": import_buffer, "ShareParameters": {"Target": target}} + response = self.invoke_request(IMPORT_PREVIEW, "POST", data=payload) + if response.status_code == 202 and job_wait: + task_uri = response.headers["Location"] + response = self.wait_for_job_complete(task_uri, job_wait=job_wait) + return response + def get_idrac_local_account_attr(self, idrac_attribues, fqdd=None): """ This method filtered from all the user attributes from the given idrac attributes. diff --git a/plugins/modules/idrac_server_config_profile.py b/plugins/modules/idrac_server_config_profile.py index 0f4d98cdd..f60707682 100644 --- a/plugins/modules/idrac_server_config_profile.py +++ b/plugins/modules/idrac_server_config_profile.py @@ -3,8 +3,8 @@ # # Dell OpenManage Ansible Modules -# Version 7.0.0 -# Copyright (C) 2019-2022 Dell Inc. or its subsidiaries. All Rights Reserved. +# Version 7.3.0 +# Copyright (C) 2019-2023 Dell Inc. or its subsidiaries. All Rights Reserved. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # @@ -20,7 +20,7 @@ version_added: "2.1.0" description: - Export the Server Configuration Profile (SCP) from the iDRAC or import from a - network share (CIFS, NFS, HTTP, HTTPS) or a local file. + network share (CIFS, NFS, HTTP, HTTPS) or a local path. extends_documentation_fragment: - dellemc.openmanage.idrac_auth_options options: @@ -40,8 +40,8 @@ description: - Network share or local path. - CIFS, NFS, HTTP, and HTTPS network share types are supported. + - I(share_name) is mutually exclusive with I(import_buffer). type: str - required: True share_user: description: Network share user in the format 'user@domain' or 'domain\\user' if user is part of a domain else 'user'. This option is mandatory for CIFS Network Share. @@ -64,9 +64,13 @@ - If C(BIOS), this module exports or imports BIOS configuration from SCP file. - If C(NIC), this module exports or imports NIC configuration from SCP file. - If C(RAID), this module exports or imports RAID configuration from SCP file. - type: str + - When I(command) is C(export) or C(import) I(target) with multiple components is supported only + on iDRAC9 with firmware 6.10.00.00 and above. + type: list choices: ['ALL', 'IDRAC', 'BIOS', 'NIC', 'RAID'] default: 'ALL' + elements: str + aliases: ['target'] shutdown_type: description: - This option is applicable for C(import) command. @@ -90,13 +94,92 @@ choices: ['JSON', 'XML'] default: 'XML' export_use: - description: Specify the type of server configuration profile (SCP) to be exported. - This option is applicable for C(export) command. + description: + - Specify the type of Server Configuration Profile (SCP) to be exported. + - This option is applicable when I(command) is C(export). + - C(Default) Creates a non-destructive snapshot of the configuration. + - C(Replace) Replaces a server with another or restores the servers settings to a known baseline. + - C(Clone) Clones settings from one server to another server with the identical hardware setup. + All settings except I/O identity are updated (e.g. will reset RAID). The settings in this export + will be destructive when uploaded to another system. type: str choices: ['Default', 'Clone', 'Replace'] default: 'Default' + version_added: 7.3.0 + ignore_certificate_warning: + description: + - If C(ignore), it ignores the certificate warnings. + - If C(showerror), it shows the certificate warnings. + - I(ignore_certificate_warning) is considered only when I(share_name) is of type HTTPS and is + supported only on iDRAC9. + type: str + choices: [ignore, showerror] + default: ignore + version_added: 7.3.0 + include_in_export: + description: + - This option is applicable when I(command) is C(export). + - If C(default), it exports the default Server Configuration Profile. + - If C(readonly), it exports the SCP with readonly attributes. + - If C(passwordhashvalues), it exports the SCP with password hash values. + - If C(customtelemetry), exports the SCP with custom telemetry attributes supported only in the iDRAC9. + type: str + choices: [default, readonly, passwordhashvalues, customtelemetry] + default: default + version_added: 7.3.0 + import_buffer: + description: + - Used to import the buffer input of xml or json into the iDRAC. + - This option is applicable when I(command) is C(import) and C(preview). + - I(import_buffer) is mutually exclusive with I(share_name). + type: str + version_added: 7.3.0 + proxy_support: + description: + - Proxy to be enabled or disabled. + - I(proxy_support) is considered only when I(share_name) is of type HTTP or HTTPS and is supported only on iDRAC9. + type: bool + default: False + version_added: 7.3.0 + proxy_type: + description: + - C(http) to select HTTP type proxy. + - C(socks4) to select SOCKS4 type proxy. + - I(proxy_type) is considered only when I(share_name) is of type HTTP or HTTPS and is supported only on iDRAC9. + type: str + choices: [http, socks4] + default: http + version_added: 7.3.0 + proxy_server: + description: + - I(proxy_server) is required when I(share_name) is of type HTTPS or HTTP and I(proxy_support) is C(true). + - I(proxy_server) is considered only when I(share_name) is of type HTTP or HTTPS and is supported only on iDRAC9. + type: str + version_added: 7.3.0 + proxy_port: + description: + - Proxy port to authenticate. + - I(proxy_port) is required when I(share_name) is of type HTTPS or HTTP and I(proxy_support) is C(true). + - I(proxy_port) is considered only when I(share_name) is of type HTTP or HTTPS and is supported only on iDRAC9. + type: str + default: "80" + version_added: 7.3.0 + proxy_username: + description: + - Proxy username to authenticate. + - I(proxy_username) is considered only when I(share_name) is of type HTTP or HTTPS + and is supported only on iDRAC9. + type: str + version_added: 7.3.0 + proxy_password: + description: + - Proxy password to authenticate. + - I(proxy_password) is considered only when I(share_name) is of type HTTP or HTTPS + and is supported only on iDRAC9. + type: str + version_added: 7.3.0 requirements: - - "python >= 3.8.6" + - "python >= 3.9.14" author: - "Jagadeesh N V(@jagadeeshnv)" - "Felix Stephen (@felixs88)" @@ -106,6 +189,7 @@ - This module supports C(check_mode). - To import Server Configuration Profile (SCP) on the iDRAC7 and iDRAC8-based servers, the servers must have iDRAC Enterprise license or later. + - For C(import) operation, C(check_mode) is supported only when I(target) is C(ALL). ''' EXAMPLES = r''' @@ -117,11 +201,12 @@ idrac_password: "user_password" ca_path: "/path/to/ca_cert.pem" share_name: "/scp_folder" - scp_components: IDRAC + scp_components: + - IDRAC scp_file: example_file export_format: JSON export_use: Clone - job_wait: True + job_wait: true - name: Import SCP with IDRAC components in JSON format from a local path dellemc.openmanage.idrac_server_config_profile: @@ -131,11 +216,12 @@ ca_path: "/path/to/ca_cert.pem" share_name: "/scp_folder" command: import - scp_components: "IDRAC" + scp_components: + - IDRAC scp_file: example_file.json shutdown_type: Graceful end_host_power_state: "On" - job_wait: False + job_wait: false - 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: @@ -144,10 +230,11 @@ idrac_password: "user_password" ca_path: "/path/to/ca_cert.pem" share_name: "192.168.0.2:/share" - scp_components: "BIOS" + scp_components: + - BIOS export_format: XML export_use: Default - job_wait: True + job_wait: true - name: Import SCP with BIOS components in XML format from a NFS share path dellemc.openmanage.idrac_server_config_profile: @@ -157,11 +244,12 @@ ca_path: "/path/to/ca_cert.pem" share_name: "192.168.0.2:/share" command: import - scp_components: "BIOS" + scp_components: + - BIOS scp_file: 192.168.0.1_20210618_162856.xml shutdown_type: NoReboot end_host_power_state: "Off" - job_wait: False + job_wait: false - 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: @@ -172,12 +260,12 @@ 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" + scp_components: + - RAID export_format: XML export_use: Default - job_wait: True + job_wait: true - name: Import SCP with RAID components in XML format from a CIFS share path dellemc.openmanage.idrac_server_config_profile: @@ -188,13 +276,13 @@ 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_components: + - RAID scp_file: example_file.xml shutdown_type: Forced end_host_power_state: "On" - job_wait: True + job_wait: true - name: Export SCP with ALL components in JSON format to a HTTP share path dellemc.openmanage.idrac_server_config_profile: @@ -206,9 +294,10 @@ share_user: share_username share_password: share_password scp_file: example_file.json - scp_components: ALL + scp_components: + - ALL export_format: JSON - job_wait: False + job_wait: false - name: Import SCP with ALL components in JSON format from a HTTP share path dellemc.openmanage.idrac_server_config_profile: @@ -223,7 +312,7 @@ scp_file: example_file.json shutdown_type: Graceful end_host_power_state: "On" - job_wait: True + job_wait: true - name: Export SCP with ALL components in XML format to a HTTPS share path without SCP file name dellemc.openmanage.idrac_server_config_profile: @@ -234,10 +323,11 @@ share_name: "https://192.168.0.4/share" share_user: share_username share_password: share_password - scp_components: ALL + scp_components: + - ALL export_format: XML export_use: Replace - job_wait: True + job_wait: true - name: Import SCP with ALL components in XML format from a HTTPS share path dellemc.openmanage.idrac_server_config_profile: @@ -252,9 +342,9 @@ scp_file: 192.168.0.1_20160618_164647.xml shutdown_type: Graceful end_host_power_state: "On" - job_wait: False + job_wait: false -- name: Preview SCP with ALL components in XML format from a CIFS share path +- name: Preview SCP with IDRAC components in XML format from a CIFS share path dellemc.openmanage.idrac_server_config_profile: idrac_ip: "{{ idrac_ip }}" idrac_user: "{{ idrac_user }}" @@ -264,11 +354,12 @@ share_user: share_username share_password: share_password command: preview - scp_components: "ALL" + scp_components: + - ALL scp_file: example_file.xml - job_wait: True + job_wait: true -- name: Preview SCP with ALL components in JSON format from a NFS share path +- 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 }}" @@ -276,11 +367,12 @@ ca_path: "/path/to/ca_cert.pem" share_name: "192.168.0.2:/share" command: preview - scp_components: "IDRAC" + scp_components: + - IDRAC scp_file: example_file.xml - job_wait: True + job_wait: true -- name: Preview SCP with ALL components in XML format from a HTTP share path +- name: Preview SCP with IDRAC components in XML format from a HTTP share path dellemc.openmanage.idrac_server_config_profile: idrac_ip: "{{ idrac_ip }}" idrac_user: "{{ idrac_user }}" @@ -290,11 +382,12 @@ share_user: share_username share_password: share_password command: preview - scp_components: "ALL" + scp_components: + - ALL scp_file: example_file.xml - job_wait: True + job_wait: true -- name: Preview SCP with ALL components in XML format from a local path +- 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 }}" @@ -302,9 +395,72 @@ ca_path: "/path/to/ca_cert.pem" share_name: "/scp_folder" command: preview - scp_components: "IDRAC" + scp_components: + - IDRAC scp_file: example_file.json - job_wait: False + job_wait: false + +- 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: " + Disabled" + +- 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: "http://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 + +- 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 + +- 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\"}]}]}}" ''' RETURN = r''' @@ -374,6 +530,12 @@ NO_CHANGES_FOUND = "No changes found to be applied." INVALID_FILE = "Invalid file path provided." JOB_URI = "/redfish/v1/Managers/iDRAC.Embedded.1/Oem/Dell/Jobs/{job_id}" +IGNORE_WARNING = {"ignore": "Enabled", "showerror": "Disabled"} +IN_EXPORTS = {"default": "Default", "readonly": "IncludeReadOnly", "passwordhashvalues": "IncludePasswordHashValues", + "customtelemetry": "IncludeCustomTelemetry"} +SCP_ALL_ERR_MSG = "The option ALL cannot be used with options IDRAC, BIOS, NIC, or RAID." +MUTUALLY_EXCLUSIVE = "import_buffer is mutually exclusive with {0}." +PROXY_ERR_MSG = "proxy_support is enabled but all of the following are missing: proxy_server" def get_scp_file_format(module): @@ -404,8 +566,9 @@ def response_format_change(response, params, file_name): if response.get("Oem") is not None: response.update(response["Oem"]["Dell"]) response.pop("Oem", None) - sep = "/" if "/" in params["share_name"] else "\\" - response["file"] = "{0}{1}{2}".format(params["share_name"], sep, file_name) + if params.get("share_name") is not None: + sep = "/" if "/" in params.get("share_name") else "\\" + response["file"] = "{0}{1}{2}".format(params.get("share_name"), sep, file_name) response["retval"] = True else: location = response.headers.get("Location") @@ -417,13 +580,36 @@ def response_format_change(response, params, file_name): resp["Status"] = "Success" resp["Message"] = "none" resp["StatusCode"] = response.status_code - sep = "/" if "/" in params["share_name"] else "\\" - resp["file"] = "{0}{1}{2}".format(params["share_name"], sep, file_name) + if params.get("share_name") is not None: + sep = "/" if "/" in params["share_name"] else "\\" + resp["file"] = "{0}{1}{2}".format(params["share_name"], sep, file_name) resp["retval"] = True response = resp return response +def get_proxy_share(module): + proxy_share = {} + proxy_support = module.params.get("proxy_support") + proxy_type = module.params["proxy_type"] + proxy_server = module.params.get("proxy_server") + proxy_port = module.params["proxy_port"] + proxy_username = module.params.get("proxy_username") + proxy_password = module.params.get("proxy_password") + if proxy_support is True and proxy_server is None: + module.fail_json(msg=PROXY_ERR_MSG) + if proxy_support is True: + proxy_share["proxy_server"] = proxy_server + proxy_share["proxy_username"] = proxy_username + proxy_share["proxy_password"] = proxy_password + proxy_share["proxy_port"] = proxy_port + proxy_share["proxy_type"] = proxy_type.upper() + proxy_share["proxy_support"] = "Enabled" + else: + proxy_share["proxy_support"] = "Disabled" + return proxy_share + + def run_export_import_scp_http(idrac, module): share_url = urlparse(module.params["share_name"]) share = {} @@ -435,19 +621,44 @@ def run_export_import_scp_http(idrac, module): scp_file_name_format = scp_file share["username"] = module.params.get("share_user") share["password"] = module.params.get("share_password") + scp_target = ",".join(module.params["scp_components"]) command = module.params["command"] + if share["share_type"] == "HTTPS": + share["ignore_certificate_warning"] = IGNORE_WARNING[module.params["ignore_certificate_warning"]] if command == "import": + job_wait = copy.copy(module.params["job_wait"]) + if module.check_mode: + module.params["job_wait"] = True + scp_resp = preview_scp_redfish(module, idrac, True, import_job_wait=True) + if "SYS081" in scp_resp["MessageId"] or "SYS082" in scp_resp["MessageId"]: + module.exit_json(msg=CHANGES_FOUND, changed=True) + elif "SYS069" in scp_resp["MessageId"]: + module.exit_json(msg=NO_CHANGES_FOUND) + else: + module.fail_json(msg=scp_resp) + module.params["job_wait"] = job_wait + + if module.params.get("import_buffer") and module.params.get("share_name") is not None: + module.fail_json(msg=MUTUALLY_EXCLUSIVE.format("share_name")) + if share["share_type"] in ["HTTP", "HTTPS"]: + proxy_share = get_proxy_share(module) + share.update(proxy_share) scp_response = idrac.import_scp_share(shutdown_type=module.params["shutdown_type"], host_powerstate=module.params["end_host_power_state"], job_wait=module.params["job_wait"], - target=module.params["scp_components"], share=share, ) + target=scp_target, share=share, ) elif command == "export": scp_file_name_format = get_scp_file_format(module) share["file_name"] = scp_file_name_format + include_in_export = IN_EXPORTS[module.params["include_in_export"]] + if share["share_type"] in ["HTTP", "HTTPS"]: + proxy_share = get_proxy_share(module) + share.update(proxy_share) scp_response = idrac.export_scp(export_format=module.params["export_format"], export_use=module.params["export_use"], - target=module.params["scp_components"], - job_wait=module.params["job_wait"], share=share, ) + target=scp_target, + job_wait=module.params["job_wait"], share=share, + include_in_export=include_in_export) scp_response = response_format_change(scp_response, module.params, scp_file_name_format) if isinstance(scp_response, dict) and scp_response.get("TaskStatus") == "Critical": module.fail_json(msg="Failed to {0} scp.".format(command), scp_status=scp_response) @@ -458,17 +669,16 @@ def get_scp_share_details(module): share_name = module.params.get("share_name") command = module.params["command"] scp_file_name_format = get_scp_file_format(module) - if ":" in share_name: - nfs_split = share_name.split(":") - share = {"share_ip": nfs_split[0], "share_name": nfs_split[1], "share_type": "NFS"} + if ":/" in share_name: + nfs_split = share_name.split(":/", 1) + share = {"share_ip": nfs_split[0], "share_name": "/{0}".format(nfs_split[1]), "share_type": "NFS"} if command == "export": share["file_name"] = scp_file_name_format elif "\\" in share_name: - ip_pattern = re.compile(r"\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}") - share_path = re.split(ip_pattern, share_name) - share_ip = re.findall(ip_pattern, share_name) - share_path_name = "\\".join(list(filter(None, share_path[-1].split("\\")))) - share = {"share_ip": share_ip[0], "share_name": share_path_name, "share_type": "CIFS", + cifs_share = share_name.split("\\", 3) + share_ip = cifs_share[2] + share_path_name = cifs_share[-1] + share = {"share_ip": share_ip, "share_name": share_path_name, "share_type": "CIFS", "username": module.params.get("share_user"), "password": module.params.get("share_password")} if command == "export": share["file_name"] = scp_file_name_format @@ -482,16 +692,18 @@ def get_scp_share_details(module): def export_scp_redfish(module, idrac): command = module.params["command"] share, scp_file_name_format = get_scp_share_details(module) + scp_components = ",".join(module.params["scp_components"]) + include_in_export = IN_EXPORTS[module.params["include_in_export"]] if share["share_type"] == "LOCAL": scp_response = idrac.export_scp(export_format=module.params["export_format"], export_use=module.params["export_use"], - target=module.params["scp_components"], + target=scp_components, include_in_export=include_in_export, job_wait=False, share=share, ) scp_response = wait_for_response(scp_response, module, share, idrac) else: scp_response = idrac.export_scp(export_format=module.params["export_format"], export_use=module.params["export_use"], - target=module.params["scp_components"], + target=scp_components, include_in_export=include_in_export, job_wait=module.params["job_wait"], share=share, ) scp_response = response_format_change(scp_response, module.params, scp_file_name_format) if isinstance(scp_response, dict) and scp_response.get("TaskStatus") == "Critical": @@ -516,71 +728,89 @@ def wait_for_response(scp_resp, module, share, idrac): def preview_scp_redfish(module, idrac, http_share, import_job_wait=False): + import_buffer = module.params.get("import_buffer") + if import_buffer and module.params.get("share_name") is not None: + module.fail_json(msg=MUTUALLY_EXCLUSIVE.format("share_name")) command = module.params["command"] - scp_target = module.params["scp_components"] + scp_targets = ",".join(module.params["scp_components"]) job_wait_option = module.params["job_wait"] if command == "import": job_wait_option = import_job_wait - if http_share: - share_url = urlparse(module.params["share_name"]) - share = {"share_ip": share_url.netloc, "share_name": share_url.path.strip('/'), - "share_type": share_url.scheme.upper(), "file_name": module.params.get("scp_file"), - "username": module.params.get("share_user"), "password": module.params.get("share_password")} + share = {} + if not import_buffer: + if http_share: + share_url = urlparse(module.params["share_name"]) + share = {"share_ip": share_url.netloc, "share_name": share_url.path.strip('/'), + "share_type": share_url.scheme.upper(), "file_name": module.params.get("scp_file"), + "username": module.params.get("share_user"), "password": module.params.get("share_password")} + if http_share == "HTTPS": + share["ignore_certificate_warning"] = IGNORE_WARNING[module.params["ignore_certificate_warning"]] + else: + share, scp_file_name_format = get_scp_share_details(module) + share["file_name"] = module.params.get("scp_file") + buffer_text = None + if share["share_type"] == "LOCAL": + file_path = "{0}{1}{2}".format(share["share_name"], os.sep, share["file_name"]) + if not exists(file_path): + module.fail_json(msg=INVALID_FILE) + with open(file_path, "r") as file_obj: + buffer_text = file_obj.read() + scp_response = idrac.import_preview(import_buffer=buffer_text, target=scp_targets, + share=share, job_wait=job_wait_option) else: - share, scp_file_name_format = get_scp_share_details(module) - share["file_name"] = module.params.get("scp_file") - buffer_text = None - if share["share_type"] == "LOCAL": - scp_target = "ALL" - file_path = "{0}{1}{2}".format(share["share_name"], os.sep, share["file_name"]) - if not exists(file_path): - module.fail_json(msg=INVALID_FILE) - with open(file_path, "r") as file_obj: - buffer_text = file_obj.read() - scp_response = idrac.import_preview(import_buffer=buffer_text, target=scp_target, - share=share, job_wait=job_wait_option) - scp_response = response_format_change(scp_response, module.params, share["file_name"]) + scp_response = idrac.import_preview(import_buffer=import_buffer, target=scp_targets, job_wait=job_wait_option) + scp_response = response_format_change(scp_response, module.params, share.get("file_name")) if isinstance(scp_response, dict) and scp_response.get("TaskStatus") == "Critical": module.fail_json(msg="Failed to {0} scp.".format(command), scp_status=scp_response) return scp_response def import_scp_redfish(module, idrac, http_share): + import_buffer = module.params.get("import_buffer") + if import_buffer and module.params.get("share_name") is not None: + module.fail_json(msg=MUTUALLY_EXCLUSIVE.format("share_name")) command = module.params["command"] - scp_target = module.params["scp_components"] + scp_targets = ",".join(module.params["scp_components"]) job_wait = copy.copy(module.params["job_wait"]) if module.check_mode: module.params["job_wait"] = True scp_resp = preview_scp_redfish(module, idrac, http_share, import_job_wait=True) if "SYS081" in scp_resp["MessageId"] or "SYS082" in scp_resp["MessageId"]: module.exit_json(msg=CHANGES_FOUND, changed=True) + elif "SYS069" in scp_resp["MessageId"]: + module.exit_json(msg=NO_CHANGES_FOUND) else: module.fail_json(msg=scp_resp) - if http_share: - share_url = urlparse(module.params["share_name"]) - share = {"share_ip": share_url.netloc, "share_name": share_url.path.strip('/'), - "share_type": share_url.scheme.upper(), "file_name": module.params.get("scp_file"), - "username": module.params.get("share_user"), "password": module.params.get("share_password")} + share = {} + if not import_buffer: + if http_share: + share_url = urlparse(module.params["share_name"]) + share = {"share_ip": share_url.netloc, "share_name": share_url.path.strip('/'), + "share_type": share_url.scheme.upper(), "file_name": module.params.get("scp_file"), + "username": module.params.get("share_user"), "password": module.params.get("share_password")} + if http_share == "HTTPS": + share["ignore_certificate_warning"] = IGNORE_WARNING[module.params["ignore_certificate_warning"]] + else: + share, scp_file_name_format = get_scp_share_details(module) + share["file_name"] = module.params.get("scp_file") + buffer_text = None + share_dict = share + if share["share_type"] == "LOCAL": + file_path = "{0}{1}{2}".format(share["share_name"], os.sep, share["file_name"]) + if not exists(file_path): + module.fail_json(msg=INVALID_FILE) + with open(file_path, "r") as file_obj: + buffer_text = file_obj.read() + share_dict = {} + module.params["job_wait"] = job_wait + scp_response = idrac.import_scp_share(shutdown_type=module.params["shutdown_type"], + host_powerstate=module.params["end_host_power_state"], + job_wait=module.params["job_wait"], + target=scp_targets, + import_buffer=buffer_text, share=share_dict, ) else: - share, scp_file_name_format = get_scp_share_details(module) - share["file_name"] = module.params.get("scp_file") - buffer_text = None - share_dict = share - if share["share_type"] == "LOCAL": - scp_target = "ALL" - file_path = "{0}{1}{2}".format(share["share_name"], os.sep, share["file_name"]) - if not exists(file_path): - module.fail_json(msg=INVALID_FILE) - with open(file_path, "r") as file_obj: - buffer_text = file_obj.read() - share_dict = {} - module.params["job_wait"] = job_wait - scp_response = idrac.import_scp_share(shutdown_type=module.params["shutdown_type"], - host_powerstate=module.params["end_host_power_state"], - job_wait=module.params["job_wait"], - target=scp_target, - import_buffer=buffer_text, share=share_dict, ) - scp_response = response_format_change(scp_response, module.params, share["file_name"]) + scp_response = idrac.import_scp(import_buffer=import_buffer, target=scp_targets, job_wait=module.params["job_wait"]) + scp_response = response_format_change(scp_response, module.params, share.get("file_name")) if isinstance(scp_response, dict) and scp_response.get("TaskStatus") == "Critical": module.fail_json(msg="Failed to {0} scp.".format(command), scp_status=scp_response) return scp_response @@ -591,13 +821,13 @@ def main(): "command": {"required": False, "type": 'str', "choices": ['export', 'import', 'preview'], "default": 'export'}, "job_wait": {"required": True, "type": 'bool'}, - "share_name": {"required": True, "type": 'str'}, + "share_name": {"required": False, "type": 'str'}, "share_user": {"required": False, "type": 'str'}, "share_password": {"required": False, "type": 'str', "aliases": ['share_pwd'], "no_log": True}, - "scp_components": {"required": False, + "scp_components": {"type": "list", "required": False, "elements": "str", "choices": ['ALL', 'IDRAC', 'BIOS', 'NIC', 'RAID'], - "default": 'ALL'}, + "default": ['ALL'], "aliases": ["target"]}, "scp_file": {"required": False, "type": 'str'}, "shutdown_type": {"required": False, "choices": ['Graceful', 'Forced', 'NoReboot'], @@ -608,20 +838,36 @@ def main(): "export_format": {"required": False, "type": 'str', "choices": ['JSON', 'XML'], "default": 'XML'}, "export_use": {"required": False, "type": 'str', - "choices": ['Default', 'Clone', 'Replace'], "default": 'Default'} + "choices": ['Default', 'Clone', 'Replace'], "default": 'Default'}, + "ignore_certificate_warning": {"required": False, "choices": ["ignore", "showerror"], "default": "ignore"}, + "include_in_export": {"required": False, "type": "str", "default": "default", + "choices": ["default", "readonly", "passwordhashvalues", "customtelemetry"]}, + "import_buffer": {"type": "str", "required": False}, + "proxy_support": {"type": "bool", "required": False, "default": False}, + "proxy_type": {"type": "str", "required": False, "choices": ["http", "socks4"], "default": "http"}, + "proxy_server": {"type": "str", "required": False}, + "proxy_port": {"type": "str", "required": False, "default": "80"}, + "proxy_username": {"type": "str", "required": False}, + "proxy_password": {"type": "str", "required": False, "no_log": True}, } specs.update(idrac_auth_params) module = AnsibleModule( argument_spec=specs, required_if=[ - ["command", "import", ["scp_file"]], - ["command", "preview", ["scp_file"]], + ["command", "export", ["share_name"]], ], supports_check_mode=True) + scp_components = module.params["scp_components"] + if not len(scp_components) == 1 and "ALL" in scp_components: + module.fail_json(msg=SCP_ALL_ERR_MSG) + if module.params["command"] in ["import", "preview"] and (module.params.get("scp_file") is not None and + module.params.get("import_buffer") is not None): + module.fail_json(msg=MUTUALLY_EXCLUSIVE.format("scp_file")) try: - changed = False - http_share = module.params["share_name"].lower().startswith(('http://', 'https://')) + changed, http_share = False, "" + if module.params.get("share_name") is not None: + http_share = module.params["share_name"].lower().startswith(('http://', 'https://')) with iDRACRedfishAPI(module.params) as idrac: command = module.params['command'] if command == 'import': @@ -654,7 +900,7 @@ def main(): msg = "Successfully triggered the job to {0} the Server Configuration Profile." module.exit_json(msg=msg.format(command), scp_status=scp_status) except HTTPError as err: - module.fail_json(msg=str(err), error_info=json.load(err)) + module.exit_json(msg=str(err), error_info=json.load(err), failed=True) except URLError as err: module.exit_json(msg=str(err), unreachable=True) except (ImportError, ValueError, RuntimeError, SSLValidationError, diff --git a/roles/idrac_export_server_config_profile/.yamllint b/roles/idrac_export_server_config_profile/.yamllint new file mode 100644 index 000000000..882767605 --- /dev/null +++ b/roles/idrac_export_server_config_profile/.yamllint @@ -0,0 +1,33 @@ +--- +# Based on ansible-lint config +extends: default + +rules: + braces: + max-spaces-inside: 1 + level: error + brackets: + max-spaces-inside: 1 + level: error + colons: + max-spaces-after: -1 + level: error + commas: + max-spaces-after: -1 + level: error + comments: disable + comments-indentation: disable + document-start: disable + empty-lines: + max: 3 + level: error + hyphens: + level: error + indentation: disable + key-duplicates: enable + line-length: disable + new-line-at-end-of-file: disable + new-lines: + type: unix + trailing-spaces: disable + truthy: disable diff --git a/roles/idrac_export_server_config_profile/README.md b/roles/idrac_export_server_config_profile/README.md new file mode 100644 index 000000000..b1d4cd957 --- /dev/null +++ b/roles/idrac_export_server_config_profile/README.md @@ -0,0 +1,362 @@ +# idrac_export_server_config_profile + +Role to Export the Server Configuration Profile (SCP) from the iDRAC to a network share (CIFS, NFS, HTTP, HTTPS) or a local path. + +## Requirements + +### Development +Requirements to develop and contribute to the role. +``` +ansible +docker +molecule +python +``` +### Production +Requirements to use the role. +``` +ansible +python +``` + +### Ansible collections +Collections required to use the role +``` +dellemc.openmanage +``` + +## Role Variables + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameRequiredDefault ValueChoicesTypeDescription
idrac_iptruestr- iDRAC IP Address
idrac_usertruestr- iDRAC username
idrac_passwordtruestr- iDRAC user password.
idrac_portfalse443int- iDRAC port.
validate_certsfalsetruebool- If C(false), the SSL certificates will not be validated.
- Configure C(false) only on personally controlled sites where self-signed certificates are used.
ca_pathfalsepath- The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation.
idrac_timeoutfalse30int- The HTTPS socket level timeout in seconds.
share_parametersfalsedict
     share_nametruestr- Network share or local path.
- CIFS, NFS, HTTP, and HTTPS network share types are supported.
     scp_filefalsestr- Name of the server configuration profile (SCP) file.
- The default format `idrac_ip_YYMMDD_HHMMSS_scp` is used if this option is not specified.
- I(export_format) is used if the valid extension file is not provided.
     share_userfalsestr- Network share user in the format 'user@domain' or 'domain\\user' if user is part of a domain else 'user'. This option is mandatory for CIFS Network Share..
     share_passwordfalsestr- Network share user password. This option is mandatory for CIFS Network Share.
     proxy_supportfalsefalsebool- Proxy to be enabled or disabled.
- I(proxy_support) is considered only when I(share_name) is of type HTTP or HTTPS and is supported only on iDRAC9.
     proxy_typefalsehttphttp, socks4str- C(http) to select HTTP type proxy.
- C(socks4) to select SOCKS4 type proxy.
- I(proxy_type) is considered only when I(share_name) is of type HTTP or HTTPS and is supported only on iDRAC9.
     proxy_serverfalsestr - I(proxy_server) is required when I(share_name) is of type HTTPS or HTTP and I(proxy_support) is C(true).
- I(proxy_server) is considered only when I(share_name) is of type HTTP or HTTPS and is supported only on iDRAC9.
     proxy_portfalse80str- Proxy port to authenticate.
- I(proxy_port) is required when I(share_name) is of type HTTPS or HTTP and I(proxy_support) is C(true).
- I(proxy_port) is considered only when I(share_name) is of type HTTP or HTTPS and is supported only on iDRAC9.
     proxy_usernamefalsestr- Proxy username to authenticate.
- I(proxy_username) is considered only when I(share_name) is of type HTTP or HTTPS and is supported only on iDRAC9.
     proxy_passwordfalsestr- Proxy password to authenticate.
- I(proxy_password) is considered only when I(share_name) is of type HTTP or HTTPS and is supported only on iDRAC9.
     ignore_certificate_warningfalseignoreignore, showerrorstr- If C(ignore), it ignores the certificate warnings.
- If C(showerror), it shows the certificate warnings.
- I(ignore_certificate_warning) is considered only when I(share_name) is of type HTTPS and is supported only on iDRAC9.
include_in_exportfalsedefaultdefault, readonly, passwordhashvalues, customtelemetrystr- This option is applicable when I(command) is C(export).
- If C(default), it exports the default Server Configuration Profile.
- If C(readonly), it exports the SCP with readonly attributes.
- If C(passwordhashvalues), it exports the SCP with password hash values.
- If C(customtelemetry), exports the SCP with custom telemetry attributes supported only in the iDRAC9.
targetfalse['ALL']'ALL', 'IDRAC', 'BIOS', 'NIC', 'RAID'str- If C(ALL), this module exports or imports all components configurations from SCP file.
- If C(IDRAC), this module exports or imports iDRAC configuration from SCP file.
- If C(BIOS), this module exports or imports BIOS configuration from SCP file.
- If C(NIC), this module exports or imports NIC configuration from SCP file.
- If C(RAID), this module exports or imports RAID configuration from SCP file.
- When I(command) is C(export) or C(import) I(target) with multiple components is supported only on iDRAC9 with firmware 6.10.00.00 and above.
export_formatfalse'XML''JSON', 'XML'str- Specify the output file format. This option is applicable for C(export) command.
export_usefalse'Default''Default', 'Clone', 'Replace'- Specify the type of Server Configuration Profile (SCP) to be exported.
- This option is applicable when I(command) is C(export).
- C(Default) Creates a non-destructive snapshot of the configuration.
- C(Replace) Replaces a server with another or restores the servers settings to a known baseline.
- C(Clone) Clones settings from one server to another server with the identical hardware setup.
+ +## Fact varaibles + + + + + + + + + + + + + + + + + + + + + +
NameSampleDescription
out_scp{ + "changed": false, + "failed": false, + "msg": "Successfully exported the Server Configuration Profile.", + "scp_status": { + "ActualRunningStartTime": "2023-02-21T10:59:50", + "ActualRunningStopTime": "2023-02-21T11:00:08", + "CompletionTime": "2023-02-21T11:00:08", + "Id": "JID_769771903262", + "JobState": "Completed", + "JobType": "ExportConfiguration", + "Message": "Successfully exported Server Configuration Profile", + "MessageArgs": [], + "MessageId": "SYS043", + "PercentComplete": 100, + "TargetSettingsURI": null, + "file": ".\\192.1.2.1_2023221_16301_scp.xml", + "retval": true + } + }Module output of the Server Configuration Job
share_typeNFSStores the share type sent as part of the role variables
+ +## Examples +----- + +``` +- name: Exporting SCP local path with all components + ansible.builtin.import_role: + name: idrac_export_server_config_profile + vars: + idrac_ip: "192.1.2.1" + idrac_user: "username" + idrac_password: "password" + ca_path: "/path/to/ca_cert.pem" + share_parameters: + share_name: "/root/tmp" + scp_file: "file.xml" +``` +``` +- name: "Exporting SCP to NFS with iDRAC components" + ansible.builtin.import_role: + name: "idrac_export_server_config_profile" + vars: + idrac_ip: "192.1.2.1" + idrac_user: "username" + idrac_password: "password" + ca_path: "/path/to/ca_cert.pem" + target: ['IDRAC'] + share_parameters: + share_name: "191.2.1.1:/nfs" + scp_file: "file.json" +``` +``` +- name: "Exporting SCP to CIFS with BIOS components" + ansible.builtin.import_role: + name: "idrac_export_server_config_profile" + vars: + idrac_ip: "192.1.2.1" + idrac_user: "username" + idrac_password: "password" + ca_path: "/path/to/ca_cert.pem" + target: ['BIOS'] + share_parameters: + share_name: "\\\\191.1.1.1\\cifs" + share_user: "username" + share_password: "password" + scp_file: "file.xml" +``` +``` +- name: "Exporting SCP to HTTPS with RAID components" + ansible.builtin.import_role: + name: "idrac_export_server_config_profile" + vars: + idrac_ip: "192.1.2.1" + idrac_user: "username" + idrac_password: "password" + ca_path: "/path/to/ca_cert.pem" + target: ['RAID'] + share_parameters: + share_name: "https://192.1.1.1/share" + share_user: "username" + share_password: "password" + scp_file: "filename.json" +``` +``` +- name: "Exporting SCP to HTTP with NIC components" + ansible.builtin.import_role: + name: "idrac_export_server_config_profile" + vars: + idrac_ip: "192.1.2.1" + idrac_user: "username" + idrac_password: "password" + ca_path: "/path/to/ca_cert.pem" + target: ['NIC'] + share_parameters: + share_name: "http://192.1.1.1/share" + share_user: "username" + share_password: "password" + scp_file: "filename.xml" +``` +``` +- name: Export SCP + hosts: idrac + connection: local + roles: + - role: idrac_export_server_config_profile +``` + +## Author Information +------------------ + +Dell Technologies
+Abhishek Sinha (Abhishek.Sinha10@Dell.com) 2023 \ No newline at end of file diff --git a/roles/idrac_export_server_config_profile/defaults/main.yml b/roles/idrac_export_server_config_profile/defaults/main.yml new file mode 100644 index 000000000..96b7d2127 --- /dev/null +++ b/roles/idrac_export_server_config_profile/defaults/main.yml @@ -0,0 +1,15 @@ +--- +# defaults file for idrac_export_server_config_profile + +idrac_port: 443 +validate_certs: true +idrac_timeout: 30 +share_parameters: + proxy_support: false + proxy_type: http + proxy_port: "80" + ignore_certificate_warning: ignore +target: ['ALL'] +export_format: XML +export_use: Default +include_in_export: default diff --git a/roles/idrac_export_server_config_profile/handlers/main.yml b/roles/idrac_export_server_config_profile/handlers/main.yml new file mode 100644 index 000000000..f1a862b9a --- /dev/null +++ b/roles/idrac_export_server_config_profile/handlers/main.yml @@ -0,0 +1,2 @@ +--- +# handlers file for idrac_export_server_config_profile diff --git a/roles/idrac_export_server_config_profile/meta/argument_specs.yml b/roles/idrac_export_server_config_profile/meta/argument_specs.yml new file mode 100644 index 000000000..60ef6ca01 --- /dev/null +++ b/roles/idrac_export_server_config_profile/meta/argument_specs.yml @@ -0,0 +1,143 @@ +--- +argument_specs: + main: + version_added: "7.3.0" + short_description: Role to export iDRAC Server Configuration Profile (SCP). + description: Role to export the Server Configuration Profile (SCP) from the iDRAC to a network share (CIFS, NFS, HTTP, HTTPS) or a local path. + options: + idrac_ip: + required: true + type: str + description: iDRAC IP Address. + idrac_user: + required: true + type: str + description: iDRAC username. + idrac_password: + required: true + type: str + description: iDRAC user password. + idrac_port: + type: int + description: iDRAC port. + default: 443 + validate_certs: + description: + - If C(false), the SSL certificates will not be validated. + - Configure C(false) only on personally controlled sites where self-signed certificates are used. + type: bool + default: true + ca_path: + description: + - The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation. + type: path + idrac_timeout: + description: The HTTPS socket level timeout in seconds. + type: int + default: 30 + share_parameters: + type: dict + options: + share_name: + required: true + description: + - Network share or local path. + - CIFS, NFS, HTTP, and HTTPS network share types are supported. + - I(share_name) is mutually exclusive with I(import_buffer). + type: str + scp_file: + description: + - Name of the server configuration profile (SCP) file. + - The default format _YYMMDD_HHMMSS_scp is used if this option is not specified. + - I(export_format) is used if the valid extension file is not provided. + type: str + share_user: + description: + Network share user in the format 'user@domain' or 'domain\\user' if user is + part of a domain else 'user'. This option is mandatory for CIFS Network Share. + type: str + share_password: + description: Network share user password. This option is mandatory for CIFS Network Share. + type: str + proxy_support: + description: + - Proxy to be enabled or disabled. + - I(proxy_support) is considered only when I(share_name) is of type HTTP or HTTPS and is supported only on iDRAC9. + type: bool + default: false + proxy_type: + description: + - C(http) to select HTTP type proxy. + - C(socks4) to select SOCKS4 type proxy. + - I(proxy_type) is considered only when I(share_name) is of type HTTP or HTTPS and is supported only on iDRAC9. + type: str + choices: [http, socks4] + default: http + proxy_server: + description: + - I(proxy_server) is required when I(share_name) is of type HTTPS or HTTP and I(proxy_support) is C(true). + - I(proxy_server) is considered only when I(share_name) is of type HTTP or HTTPS and is supported only on iDRAC9. + type: str + proxy_port: + description: + - Proxy port to authenticate. + - I(proxy_port) is required when I(share_name) is of type HTTPS or HTTP and I(proxy_support) is C(true). + - I(proxy_port) is considered only when I(share_name) is of type HTTP or HTTPS and is supported only on iDRAC9. + type: str + default: 80 + proxy_username: + description: + - Proxy username to authenticate. + - I(proxy_username) is considered only when I(share_name) is of type HTTP or HTTPS and is supported only on iDRAC9. + type: str + proxy_password: + description: + - Proxy password to authenticate. + - I(proxy_password) is considered only when I(share_name) is of type HTTP or HTTPS and is supported only on iDRAC9. + type: str + ignore_certificate_warning: + description: + - If C(ignore), it ignores the certificate warnings. + - If C(showerror), it shows the certificate warnings. + - I(ignore_certificate_warning) is considered only when I(share_name) is of type HTTPS and is + supported only on iDRAC9. + type: str + choices: [ignore, showerror] + default: ignore + include_in_export: + description: + - This option is applicable when I(command) is C(export). + - If C(default), it exports the default Server Configuration Profile. + - If C(readonly), it exports the SCP with readonly attributes. + - If C(passwordhashvalues), it exports the SCP with password hash values. + - If C(customtelemetry), exports the SCP with custom telemetry attributes supported only in the iDRAC9. + type: str + choices: [default, readonly, passwordhashvalues, customtelemetry] + default: default + target: + description: + - If C(ALL), this module exports or imports all components configurations from SCP file. + - If C(IDRAC), this module exports or imports iDRAC configuration from SCP file. + - If C(BIOS), this module exports or imports BIOS configuration from SCP file. + - If C(NIC), this module exports or imports NIC configuration from SCP file. + - If C(RAID), this module exports or imports RAID configuration from SCP file. + choices: ["ALL", "IDRAC", "BIOS", "NIC", "RAID"] + default: ["ALL"] + type: list + export_format: + description: Specify the output file format. This option is applicable for C(export) command. + type: str + choices: ["JSON", "XML"] + default: "XML" + export_use: + description: + - Specify the type of Server Configuration Profile (SCP) to be exported. + - This option is applicable when I(command) is C(export). + - C(Default) Creates a non-destructive snapshot of the configuration. + - C(Replace) Replaces a server with another or restores the servers settings to a known baseline. + - C(Clone) Clones settings from one server to another server with the identical hardware setup. + All settings except I/O identity are updated (e.g. will reset RAID). The settings in this export + will be destructive when uploaded to another system. + type: str + choices: ["Default", "Clone", "Replace"] + default: "Default" diff --git a/roles/idrac_export_server_config_profile/meta/main.yml b/roles/idrac_export_server_config_profile/meta/main.yml new file mode 100644 index 000000000..6c63527fe --- /dev/null +++ b/roles/idrac_export_server_config_profile/meta/main.yml @@ -0,0 +1,53 @@ +galaxy_info: + author: 'Abhishek-Dell' + description: The role performs Export operation of Server Configuration Profile. + company: Dell Technologies + + # If the issue tracker for your role is not on github, uncomment the + # next line and provide a value + # issue_tracker_url: http://example.com/issue/tracker + + # Choose a valid license ID from https://spdx.org - some suggested licenses: + # - BSD-3-Clause (default) + # - MIT + # - GPL-2.0-or-later + # - GPL-3.0-only + # - Apache-2.0 + # - CC-BY-4.0 + license: GPL-3.0-only + + min_ansible_version: "2.13" + + # If this a Container Enabled role, provide the minimum Ansible Container version. + # min_ansible_container_version: + + # + # Provide a list of supported platforms, and for each platform a list of versions. + # If you don't wish to enumerate all versions for a particular platform, use 'all'. + # To view available platforms and versions (or releases), visit: + # https://galaxy.ansible.com/api/v1/platforms/ + # + platforms: + - name: EL + versions: + - "9" + - "8" + - name: Ubuntu + versions: + - jammy + - name: SLES + versions: + - "15SP3" + - "15SP4" + + galaxy_tags: [] + # List tags for your role here, one per line. A tag is a keyword that describes + # and categorizes the role. Users find roles by searching for tags. Be sure to + # remove the '[]' above, if you add tags to this list. + # + # NOTE: A tag is limited to a single word comprised of alphanumeric characters. + # Maximum 20 tags per role. + +dependencies: [] + # List your role dependencies here, one per line. Be sure to remove the '[]' above, + # if you add dependencies to this list. diff --git a/roles/idrac_export_server_config_profile/molecule/default/cleanup.yml b/roles/idrac_export_server_config_profile/molecule/default/cleanup.yml new file mode 100644 index 000000000..9ade81e90 --- /dev/null +++ b/roles/idrac_export_server_config_profile/molecule/default/cleanup.yml @@ -0,0 +1,96 @@ +--- +# This is an example playbook to execute Ansible cleanup. + +- name: Cleanup + hosts: all + gather_facts: false + vars: + local_path: "{{ lookup('env', 'local_path') }}" + local_filename: "{{ lookup('env', 'local_filename') }}" + nfs_filename: "{{ lookup('env', 'nfs_filename') }}" + cifs_filename: "{{ lookup('env', 'cifs_filename') }}" + https_filename: "{{ lookup('env', 'https_filename') }}" + http_filename: "{{ lookup('env', 'http_filename') }}" + nfs_mount_path: "{{ lookup('env', 'nfs_mount_path') }}" + cifs_mount_path: "{{ lookup('env', 'cifs_mount_path') }}" + + nfs_url: "{{ lookup('env', 'NFS_URL') }}" + cifs_url: "{{ lookup('env', 'CIFS_URL') }}" + cifs_username: "{{ lookup('env', 'CIFS_USERNAME') }}" + cifs_password: "{{ lookup('env', 'CIFS_PASSWORD') }}" + + https_url: "{{ lookup('env', 'HTTPS_URL') }}" + https_username: "{{ lookup('env', 'HTTPS_USERNAME') }}" + https_password: "{{ lookup('env', 'HTTPS_PASSWORD') }}" + + http_url: "{{ lookup('env', 'HTTP_URL') }}" + http_username: "{{ lookup('env', 'HTTP_USERNAME') }}" + http_password: "{{ lookup('env', 'HTTP_PASSWORD') }}" + tasks: + - name: Checking file exists in NFS mount localhost + ansible.builtin.stat: + path: "{{ nfs_mount_path }}/{{ nfs_filename }}" + delegate_to: localhost + register: nfs_file + + - name: Checking file exists in CIFS mount localhost + ansible.builtin.stat: + path: "{{ cifs_mount_path }}/{{ cifs_filename }}" + delegate_to: localhost + register: cifs_file + + - name: Checking file exists in current location + ansible.builtin.stat: + path: "{{ http_filename }}" + delegate_to: localhost + register: http_file + + - name: Checking file exists in current location + ansible.builtin.stat: + path: "{{ https_filename }}" + delegate_to: localhost + register: https_file + + - name: Deleting the file if exists in NFS mounted localhost + ansible.builtin.file: + path: "{{ nfs_mount_path }}/{{ nfs_filename }}" + state: absent + delegate_to: localhost + when: nfs_file.stat.exists + + - name: Deleting the file if exists in CIFS mounted localhost + ansible.builtin.file: + path: "{{ cifs_mount_path }}/{{ cifs_filename }}" + state: absent + delegate_to: localhost + when: cifs_file.stat.exists + + - name: Deleting the file if exists in HTTP localhost + ansible.builtin.file: + path: "{{ http_filename }}" + state: absent + delegate_to: localhost + when: http_file.stat.exists + + - name: Deleting the file if exists in HTTPS localhost + ansible.builtin.file: + path: "{{ https_filename }}" + state: absent + delegate_to: localhost + when: https_file.stat.exists + + - name: Unmounting NFS volume from localhost + ansible.posix.mount: + src: "{{ nfs_url }}" + path: "{{ nfs_mount_path }}" + state: unmounted + fstype: nfs + delegate_to: localhost + + - name: Unmounting CIFS volume from localhost + ansible.posix.mount: + src: "{{ cifs_url }}" + path: "{{ cifs_mount_path }}" + state: unmounted + fstype: nfs + delegate_to: localhost diff --git a/roles/idrac_export_server_config_profile/molecule/default/converge.yml b/roles/idrac_export_server_config_profile/molecule/default/converge.yml new file mode 100644 index 000000000..8073a85bc --- /dev/null +++ b/roles/idrac_export_server_config_profile/molecule/default/converge.yml @@ -0,0 +1,100 @@ +- name: Converge + hosts: all + vars: + local_path: "{{ lookup('env', 'local_path') }}" + local_filename: "{{ lookup('env', 'local_filename') }}" + nfs_filename: "{{ lookup('env', 'nfs_filename') }}" + cifs_filename: "{{ lookup('env', 'cifs_filename') }}" + https_filename: "{{ lookup('env', 'https_filename') }}" + http_filename: "{{ lookup('env', 'http_filename') }}" + nfs_mount_path: "{{ lookup('env', 'nfs_mount_path') }}" + cifs_mount_path: "{{ lookup('env', 'nfs_mount_path') }}" + + nfs_url: "{{ lookup('env', 'NFS_URL') }}" + cifs_url: "{{ lookup('env', 'CIFS_URL') }}" + cifs_username: "{{ lookup('env', 'CIFS_USERNAME') }}" + cifs_password: "{{ lookup('env', 'CIFS_PASSWORD') }}" + + https_url: "{{ lookup('env', 'HTTPS_URL') }}" + https_username: "{{ lookup('env', 'HTTPS_USERNAME') }}" + https_password: "{{ lookup('env', 'HTTPS_PASSWORD') }}" + + http_url: "{{ lookup('env', 'HTTP_URL') }}" + http_username: "{{ lookup('env', 'HTTP_USERNAME') }}" + http_password: "{{ lookup('env', 'HTTP_PASSWORD') }}" + gather_facts: false + tasks: + - name: Exporting SCP local path with all components + ansible.builtin.import_role: + name: idrac_export_server_config_profile + vars: + idrac_ip: "{{ lookup('env', 'IDRAC_IP') }}" + idrac_user: "{{ lookup('env', 'IDRAC_USER') }}" + idrac_password: "{{ lookup('env', 'IDRAC_PASSWORD') }}" + validate_certs: false + job_wait: true + share_parameters: + share_name: "{{ local_path }}" + scp_file: "{{ local_filename }}" + + - name: "Exporting SCP to NFS with iDRAC components" + ansible.builtin.import_role: + name: "idrac_export_server_config_profile" + vars: + idrac_ip: "{{ lookup('env', 'IDRAC_IP') }}" + idrac_user: "{{ lookup('env', 'IDRAC_USER') }}" + idrac_password: "{{ lookup('env', 'IDRAC_PASSWORD') }}" + validate_certs: false + target: ['IDRAC'] + job_wait: true + share_parameters: + share_name: "{{ nfs_url }}" + scp_file: "{{ nfs_filename }}" + + - name: "Exporting SCP to CIFS with BIOS components" + ansible.builtin.import_role: + name: "idrac_export_server_config_profile" + vars: + idrac_ip: "{{ lookup('env', 'IDRAC_IP') }}" + idrac_user: "{{ lookup('env', 'IDRAC_USER') }}" + idrac_password: "{{ lookup('env', 'IDRAC_PASSWORD') }}" + validate_certs: false + target: ['BIOS'] + job_wait: true + share_parameters: + share_name: "{{ cifs_url }}" + share_user: "{{ cifs_username }}" + share_password: "{{ cifs_password }}" + scp_file: "{{ cifs_filename }}" + + - name: "Exporting SCP to HTTPS with RAID components" + ansible.builtin.import_role: + name: "idrac_export_server_config_profile" + vars: + idrac_ip: "{{ lookup('env', 'IDRAC_IP') }}" + idrac_user: "{{ lookup('env', 'IDRAC_USER') }}" + idrac_password: "{{ lookup('env', 'IDRAC_PASSWORD') }}" + validate_certs: false + target: ['RAID'] + job_wait: true + share_parameters: + share_name: "{{ https_url }}" + share_user: "{{ https_username }}" + share_password: "{{ https_password }}" + scp_file: "{{ https_filename }}" + + - name: "Exporting SCP to HTTP with NIC components" + ansible.builtin.import_role: + name: "idrac_export_server_config_profile" + vars: + idrac_ip: "{{ lookup('env', 'IDRAC_IP') }}" + idrac_user: "{{ lookup('env', 'IDRAC_USER') }}" + idrac_password: "{{ lookup('env', 'IDRAC_PASSWORD') }}" + validate_certs: false + target: ['NIC'] + job_wait: true + share_parameters: + share_name: "{{ http_url }}" + share_user: "{{ http_username }}" + share_password: "{{ http_password }}" + scp_file: "{{ http_filename }}" diff --git a/roles/idrac_export_server_config_profile/molecule/default/molecule.yml b/roles/idrac_export_server_config_profile/molecule/default/molecule.yml new file mode 100644 index 000000000..de8cc5641 --- /dev/null +++ b/roles/idrac_export_server_config_profile/molecule/default/molecule.yml @@ -0,0 +1,26 @@ +--- +dependency: + name: galaxy +driver: + name: docker +platforms: + - name: centos8 + image: quay.io/centos/centos:stream8 + pre_build_image: true +provisioner: + name: ansible + env: + local_path: "/tmp" + local_filename: "exported_scp_local.xml" + nfs_filename: "exported_scp_nfs.json" + cifs_filename: 'exported_scp_cifs.xml' + https_filename: "exported_scp_https.json" + http_filename: "exported_scp_http.xml" + nfs_mount_path: "/tmp/nfs" + cifs_mount_path: "/tmp/cifs" +verifier: + name: ansible +lint: | + set -e + yamllint . + ansible-lint . diff --git a/roles/idrac_export_server_config_profile/molecule/default/verify.yml b/roles/idrac_export_server_config_profile/molecule/default/verify.yml new file mode 100644 index 000000000..459742c2c --- /dev/null +++ b/roles/idrac_export_server_config_profile/molecule/default/verify.yml @@ -0,0 +1,112 @@ +--- +# This is an example playbook to execute Ansible tests. + +- name: Verify + hosts: all + gather_facts: false + vars: + local_path: "{{ lookup('env', 'local_path') }}" + local_filename: "{{ lookup('env', 'local_filename') }}" + nfs_filename: "{{ lookup('env', 'nfs_filename') }}" + cifs_filename: "{{ lookup('env', 'cifs_filename') }}" + https_filename: "{{ lookup('env', 'https_filename') }}" + http_filename: "{{ lookup('env', 'http_filename') }}" + nfs_mount_path: "{{ lookup('env', 'nfs_mount_path') }}" + cifs_mount_path: "{{ lookup('env', 'cifs_mount_path') }}" + + nfs_url: "{{ lookup('env', 'NFS_URL') }}" + cifs_url: "{{ lookup('env', 'CIFS_URL') }}" + cifs_username: "{{ lookup('env', 'CIFS_USERNAME') }}" + cifs_password: "{{ lookup('env', 'CIFS_PASSWORD') }}" + + https_url: "{{ lookup('env', 'HTTPS_URL') }}" + https_username: "{{ lookup('env', 'HTTPS_USERNAME') }}" + https_password: "{{ lookup('env', 'HTTPS_PASSWORD') }}" + + http_url: "{{ lookup('env', 'HTTP_URL') }}" + http_username: "{{ lookup('env', 'HTTP_USERNAME') }}" + http_password: "{{ lookup('env', 'HTTP_PASSWORD') }}" + tasks: + - name: Checking exported file exists in Local path + ansible.builtin.stat: + path: "{{ local_path }}/{{ local_filename }}" + register: local_file + + - name: Mounting NFS volume to localhost + ansible.posix.mount: + src: "{{ nfs_url }}" + path: "{{ nfs_mount_path }}" + state: mounted + fstype: nfs + delegate_to: localhost + register: nfs_mount + + - name: Checking file exists in NFS mount localhost + ansible.builtin.stat: + path: "{{ nfs_mount_path }}/{{ nfs_filename }}" + delegate_to: localhost + register: nfs_file + + - name: Mounting CIFS volume to localhost + ansible.posix.mount: + src: "{{ cifs_url }}" + path: "{{ cifs_mount_path }}" + opts: "username={{ cifs_username }},password={{ cifs_password }}" + state: mounted + fstype: cifs + delegate_to: localhost + register: cifs_mount + no_log: true + + - name: Checking file exists in CIFS mount localhost + ansible.builtin.stat: + path: "{{ cifs_mount_path }}/{{ cifs_filename }}" + delegate_to: localhost + register: cifs_file + + - name: Downloading HTTP file to localhost + ansible.builtin.get_url: + url: "{{ http_url }}/{{ http_filename }}" + dest: . + validate_certs: false + username: "{{ http_username }}" + password: "{{ http_password }}" + mode: '0755' + delegate_to: localhost + register: http_file_download + no_log: true + changed_when: false + + - name: Checking file exists in current location + ansible.builtin.stat: + path: "{{ http_filename }}" + delegate_to: localhost + register: http_file + + - name: Downloading HTTPS file to localhost + ansible.builtin.get_url: + url: "{{ https_url }}/{{ https_filename }}" + dest: . + validate_certs: false + username: "{{ https_username }}" + password: "{{ https_password }}" + mode: '0755' + delegate_to: localhost + register: https_file_download + no_log: true + changed_when: false + + - name: Checking file exists in current location + ansible.builtin.stat: + path: "{{ https_filename }}" + delegate_to: localhost + register: https_file + + - name: Verifying file exists + ansible.builtin.assert: + that: + - local_file.stat.exists + - nfs_file.stat.exists + - cifs_file.stat.exists + - http_file.stat.exists + - https_file.stat.exists diff --git a/roles/idrac_export_server_config_profile/tasks/main.yml b/roles/idrac_export_server_config_profile/tasks/main.yml new file mode 100644 index 000000000..2b19130c5 --- /dev/null +++ b/roles/idrac_export_server_config_profile/tasks/main.yml @@ -0,0 +1,24 @@ +--- +# tasks file for idrac_export_server_config_profile +- name: Pre-req + ansible.builtin.include_tasks: pre_req.yml + +- name: Local path + ansible.builtin.include_tasks: scp_export_local.yml + when: share_type == 'Local' + +- name: NFS + ansible.builtin.include_tasks: scp_export_nfs.yml + when: share_type == 'NFS' + +- name: CIFS + ansible.builtin.include_tasks: scp_export_cifs.yml + when: share_type == 'CIFS' + +- name: HTTP + ansible.builtin.include_tasks: scp_export_http.yml + when: share_type == 'HTTP' + +- name: HTTPS + ansible.builtin.include_tasks: scp_export_https.yml + when: share_type == 'HTTPS' diff --git a/roles/idrac_export_server_config_profile/tasks/pre_req.yml b/roles/idrac_export_server_config_profile/tasks/pre_req.yml new file mode 100644 index 000000000..9668f7ee1 --- /dev/null +++ b/roles/idrac_export_server_config_profile/tasks/pre_req.yml @@ -0,0 +1,13 @@ +- name: Initializing share_type + ansible.builtin.set_fact: + share_type: '' + +- name: Checking network share type is CIFS, HTTPS, HTTP + ansible.builtin.set_fact: + share_type: "{{ item.key if share_parameters.share_name.startswith(item.value) else share_type }}" + with_dict: { 'HTTPS': 'https://', 'HTTP': 'http://', 'CIFS': '\\'} + +- name: Checking network share type is NFS, Local + ansible.builtin.set_fact: + share_type: "{{ 'NFS' if ':' in share_parameters.share_name else 'Local' }}" + when: share_type == '' diff --git a/roles/idrac_export_server_config_profile/tasks/scp_export_cifs.yml b/roles/idrac_export_server_config_profile/tasks/scp_export_cifs.yml new file mode 100644 index 000000000..a9efbdd0f --- /dev/null +++ b/roles/idrac_export_server_config_profile/tasks/scp_export_cifs.yml @@ -0,0 +1,20 @@ +--- +- name: Exporting the SCP components to CIFS + dellemc.openmanage.idrac_server_config_profile: + idrac_ip: "{{ idrac_ip }}" + idrac_port: "{{ idrac_port }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "{{ ca_path | default(omit) }}" + validate_certs: "{{ validate_certs }}" + timeout: "{{ idrac_timeout }}" + export_format: "{{ export_format }}" + export_use: "{{ export_use }}" + include_in_export: "{{ include_in_export }}" + share_user: "{{ share_parameters.share_user | default(omit) }}" + share_password: "{{ share_parameters.share_password | default(omit) }}" + share_name: "{{ share_parameters.share_name }}" + scp_file: "{{ share_parameters.scp_file | default(omit) }}" + target: "{{ target }}" + job_wait: "{{ job_wait }}" + register: out_scp diff --git a/roles/idrac_export_server_config_profile/tasks/scp_export_http.yml b/roles/idrac_export_server_config_profile/tasks/scp_export_http.yml new file mode 100644 index 000000000..6bd9d3bd9 --- /dev/null +++ b/roles/idrac_export_server_config_profile/tasks/scp_export_http.yml @@ -0,0 +1,26 @@ +--- +- name: Exporting the SCP components to HTTP + dellemc.openmanage.idrac_server_config_profile: + idrac_ip: "{{ idrac_ip }}" + idrac_port: "{{ idrac_port }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "{{ ca_path | default(omit) }}" + validate_certs: "{{ validate_certs }}" + timeout: "{{ idrac_timeout }}" + export_format: "{{ export_format }}" + export_use: "{{ export_use }}" + include_in_export: "{{ include_in_export }}" + share_user: "{{ share_parameters.share_user | default(omit) }}" + share_password: "{{ share_parameters.share_password | default(omit) }}" + share_name: "{{ share_parameters.share_name }}" + scp_file: "{{ share_parameters.scp_file | default(omit) }}" + target: "{{ target }}" + proxy_support: "{{ share_parameters.proxy_support | default(omit) }}" + proxy_type: "{{ share_parameters.proxy_type | default(omit) }}" + proxy_server: "{{ share_parameters.proxy_server | default(omit) }}" + proxy_port: "{{ share_parameters.proxy_port | default(omit) }}" + proxy_username: "{{ share_parameters.proxy_username | default(omit) }}" + proxy_password: "{{ share_parameters.proxy_password | default(omit) }}" + job_wait: "{{ job_wait }}" + register: out_scp diff --git a/roles/idrac_export_server_config_profile/tasks/scp_export_https.yml b/roles/idrac_export_server_config_profile/tasks/scp_export_https.yml new file mode 100644 index 000000000..ddfeb394a --- /dev/null +++ b/roles/idrac_export_server_config_profile/tasks/scp_export_https.yml @@ -0,0 +1,27 @@ +--- +- name: Exporting the SCP components to HTTPS + dellemc.openmanage.idrac_server_config_profile: + idrac_ip: "{{ idrac_ip }}" + idrac_port: "{{ idrac_port }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "{{ ca_path | default(omit) }}" + validate_certs: "{{ validate_certs }}" + timeout: "{{ idrac_timeout }}" + export_format: "{{ export_format }}" + export_use: "{{ export_use }}" + include_in_export: "{{ include_in_export }}" + share_user: "{{ share_parameters.share_user | default(omit) }}" + share_password: "{{ share_parameters.share_password | default(omit) }}" + share_name: "{{ share_parameters.share_name }}" + scp_file: "{{ share_parameters.scp_file | default(omit) }}" + target: "{{ target }}" + proxy_support: "{{ share_parameters.proxy_support | default(omit) }}" + proxy_type: "{{ share_parameters.proxy_type | default(omit) }}" + proxy_server: "{{ share_parameters.proxy_server | default(omit) }}" + proxy_port: "{{ share_parameters.proxy_port | default(omit) }}" + proxy_username: "{{ share_parameters.proxy_username | default(omit) }}" + proxy_password: "{{ share_parameters.proxy_password | default(omit) }}" + ignore_certificate_warning: "{{ share_parameters.ignore_certificate_warning | default(omit) }}" + job_wait: "{{ job_wait }}" + register: out_scp diff --git a/roles/idrac_export_server_config_profile/tasks/scp_export_local.yml b/roles/idrac_export_server_config_profile/tasks/scp_export_local.yml new file mode 100644 index 000000000..95ecad2a2 --- /dev/null +++ b/roles/idrac_export_server_config_profile/tasks/scp_export_local.yml @@ -0,0 +1,18 @@ +--- +- name: Exporting the SCP components to local + dellemc.openmanage.idrac_server_config_profile: + idrac_ip: "{{ idrac_ip }}" + idrac_port: "{{ idrac_port }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "{{ ca_path | default(omit) }}" + validate_certs: "{{ validate_certs }}" + timeout: "{{ idrac_timeout }}" + export_format: "{{ export_format }}" + export_use: "{{ export_use }}" + include_in_export: "{{ include_in_export }}" + share_name: "{{ share_parameters.share_name }}" + target: "{{ target }}" + scp_file: "{{ share_parameters.scp_file | default(omit) }}" + job_wait: "{{ job_wait }}" + register: out_scp diff --git a/roles/idrac_export_server_config_profile/tasks/scp_export_nfs.yml b/roles/idrac_export_server_config_profile/tasks/scp_export_nfs.yml new file mode 100644 index 000000000..b856e75a8 --- /dev/null +++ b/roles/idrac_export_server_config_profile/tasks/scp_export_nfs.yml @@ -0,0 +1,18 @@ +--- +- name: Exporting the SCP components to NFS + dellemc.openmanage.idrac_server_config_profile: + idrac_ip: "{{ idrac_ip }}" + idrac_port: "{{ idrac_port }}" + idrac_user: "{{ idrac_user }}" + idrac_password: "{{ idrac_password }}" + ca_path: "{{ ca_path | default(omit) }}" + validate_certs: "{{ validate_certs }}" + timeout: "{{ idrac_timeout }}" + export_format: "{{ export_format }}" + export_use: "{{ export_use }}" + include_in_export: "{{ include_in_export }}" + share_name: "{{ share_parameters.share_name }}" + target: "{{ target }}" + scp_file: "{{ share_parameters.scp_file | default(omit) }}" + job_wait: "{{ job_wait }}" + register: out_scp diff --git a/roles/idrac_export_server_config_profile/tests/inventory b/roles/idrac_export_server_config_profile/tests/inventory new file mode 100644 index 000000000..878877b07 --- /dev/null +++ b/roles/idrac_export_server_config_profile/tests/inventory @@ -0,0 +1,2 @@ +localhost + diff --git a/roles/idrac_export_server_config_profile/tests/test.yml b/roles/idrac_export_server_config_profile/tests/test.yml new file mode 100644 index 000000000..313357676 --- /dev/null +++ b/roles/idrac_export_server_config_profile/tests/test.yml @@ -0,0 +1,6 @@ +--- +- name: Exporitng idrac server config profile for iDRAC + hosts: localhost + remote_user: root + roles: + - idrac_export_server_config_profile diff --git a/roles/idrac_export_server_config_profile/vars/main.yml b/roles/idrac_export_server_config_profile/vars/main.yml new file mode 100644 index 000000000..72dcbef4b --- /dev/null +++ b/roles/idrac_export_server_config_profile/vars/main.yml @@ -0,0 +1,3 @@ +--- +# vars file for idrac_export_server_config_profile +job_wait: true diff --git a/tests/unit/plugins/modules/test_idrac_server_config_profile.py b/tests/unit/plugins/modules/test_idrac_server_config_profile.py index 5890d337f..60706e6cf 100644 --- a/tests/unit/plugins/modules/test_idrac_server_config_profile.py +++ b/tests/unit/plugins/modules/test_idrac_server_config_profile.py @@ -2,8 +2,8 @@ # # Dell OpenManage Ansible Modules -# Version 7.0.0 -# Copyright (C) 2020-2022 Dell Inc. or its subsidiaries. All Rights Reserved. +# Version 7.3.0 +# Copyright (C) 2020-2023 Dell Inc. or its subsidiaries. All Rights Reserved. # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # @@ -56,9 +56,9 @@ def idrac_scp_redfish_mock(self, mocker, idrac_server_configure_profile_mock): def test_run_export_import_http(self, idrac_scp_redfish_mock, idrac_default_args, mocker): idrac_default_args.update({"share_name": "192.168.0.1:/share", "share_user": "sharename", - "share_password": "sharepswd", "command": "export", - "job_wait": True, "scp_components": "IDRAC", - "scp_file": "scp_file.xml", "end_host_power_state": "On", + "share_password": "sharepswd", "command": "export", "proxy_type": False, + "job_wait": True, "scp_components": "IDRAC", "include_in_export": "default", + "scp_file": "scp_file.xml", "end_host_power_state": "On", "proxy_port": 80, "shutdown_type": "Graceful", "export_format": "XML", "export_use": "Default"}) f_module = self.get_module_mock(params=idrac_default_args) export_response = {"msg": "Successfully exported the Server Configuration Profile.", @@ -109,7 +109,7 @@ def test_http_share_msg_main(self, idrac_scp_redfish_mock, idrac_default_args, m def test_export_scp_redfish(self, idrac_scp_redfish_mock, idrac_default_args, mocker): idrac_default_args.update({"share_name": "192.168.0.1:/share", "share_user": "sharename", "share_password": "sharepswd", "command": "import", - "job_wait": False, "scp_components": "IDRAC", + "job_wait": False, "scp_components": "IDRAC", "include_in_export": "default", "scp_file": "scp_file.xml", "end_host_power_state": "On", "shutdown_type": "Graceful", "export_format": "XML", "export_use": "Default", "validate_certs": False}) @@ -354,3 +354,19 @@ def test_wait_for_response_json(self, idrac_scp_redfish_mock, idrac_default_args with patch("{0}.open".format(builtin_module_name), mock_open(read_data=str(resp_return_value["return_data"]))) as mock_file: result = self.module.wait_for_response(idrac_scp_redfish_mock, f_module, share, idrac_scp_redfish_mock) assert result.job_resp == resp_return_value["return_job"] + + def test_get_proxy_details(self, idrac_scp_redfish_mock, idrac_default_args, mocker): + idrac_default_args.update({"share_name": "/local-share", "share_user": "sharename", "command": "export", + "share_password": "sharepswd", "scp_components": "IDRAC", + "job_wait": False, "end_host_power_state": "On", "scp_file": "scp_file.xml", + "shutdown_type": "Graceful", "export_format": "JSON", "idrac_port": 443, + "export_use": "Default", "validate_certs": False, "proxy_support": True, + "proxy_server": "192.168.0.1", "proxy_type": "http", "proxy_port": 80}) + f_module = self.get_module_mock(params=idrac_default_args) + result = self.module.get_proxy_share(f_module) + assert result["proxy_type"] == "HTTP" + idrac_default_args.update({"proxy_server": None}) + f_module = self.get_module_mock(params=idrac_default_args) + with pytest.raises(Exception) as ex: + self.module.get_proxy_share(f_module) + assert ex.value.args[0] == "proxy_support is enabled but all of the following are missing: proxy_server"