Skip to content

Commit

Permalink
Fixed few more sonar issues
Browse files Browse the repository at this point in the history
  • Loading branch information
rajshekarp87 committed Dec 23, 2024
1 parent a2535bd commit d2ab276
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 15 deletions.
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ You may obtain a copy of the License at
| -------------------------------------------------------------------------------------------- |
| [omevv_baseline_profile](modules/omevv_baseline_profile.rst) |
| [omevv_baseline_profile_info](modules/omevv_baseline_profile_info.rst) |
| [omevv_firmware](modules/omevv_firmware.rst) |
| [omevv_firmware](modules/omevv_firmware.rst) |
| [omevv_firmware_compliance_info](modules/omevv_firmware_compliance_info.rst) |
| [omevv_firmware_repository_profile](modules/omevv_firmware_repository_profile.rst) |
| [omevv_firmware_repository_profile_info](modules/omevv_firmware_repository_profile_info.rst) |
Expand Down
20 changes: 14 additions & 6 deletions playbooks/omevv/omevv_firmware.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
- name: Immediately update the firmware of a single component for a specific host
- name: Immediately update the firmware of a single component for a
specific host
dellemc.openmanage.omevv.omevv_firmware:
hostname: "192.168.0.1"
vcenter_uuid: "xxxxx"
Expand All @@ -24,7 +25,8 @@
- "DCIM:INSTALLED#802__Diagnostics.Embedded.1:LC.Embedded.1"
delegate_to: localhost

- name: Update the firmware of multiple components at scheduled time for a specific host
- name: Update the firmware of multiple components at scheduled time for a
specific host
dellemc.openmanage.omevv.omevv_firmware:
hostname: "192.168.0.1"
vcenter_uuid: "xxxxx"
Expand All @@ -51,7 +53,8 @@
- "DCIM:INSTALLED#807__TPM.Integrated.1-1"
delegate_to: localhost

- name: Update the firmware of multiple components at scheduled time for a cluster
- name: Update the firmware of multiple components at scheduled time for a
cluster
dellemc.openmanage.omevv.omevv_firmware:
hostname: "192.168.0.1"
vcenter_uuid: "xxxxx"
Expand All @@ -78,7 +81,8 @@
- "DCIM:INSTALLED#807__TPM.Integrated.1-1"
delegate_to: localhost

- name: Retrieve firmware compliance report of all the hosts in the specific cluster
- name: Retrieve firmware compliance report of all the hosts in the specific
cluster
dellemc.openmanage.omevv_firmware_compliance_info:
hostname: "192.168.0.1"
vcenter_uuid: "xxxxx"
Expand All @@ -92,12 +96,16 @@

- name: Extract source name of all components
ansible.builtin.set_fact:
source_names: "{{ compliance_data.hostComplianceReports[0].componentCompliances|json_query('*.sourceName') }}"
source_names: "{{
compliance_data.hostComplianceReports[0].componentCompliances|
json_query('*.sourceName') }}"
delegate_to: localhost

- name: Extract source name of a specific component
ansible.builtin.set_fact:
source_name: "{{ compliance_data.hostComplianceReports[0].componentCompliances[0].sourceName }}"
source_name: "{{
compliance_data.hostComplianceReports[0].
componentCompliances[0].sourceName }}"
delegate_to: localhost

- name: Update firmware at the scheduled time for a specific host
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
when: 'cert_type != "HTTPS"'

- ansible.builtin.set_fact:
import_successful_msg: "Successfully performed the 'import' certificate operation.iDRAC
import_successful_msg: "Successfully performed the 'import'
certificate operation.iDRAC
has been reset successfully."
when: 'cert_type != "HTTPS"'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@
ansible.builtin.assert:
that:
- csr_content_cm.subject.commonName == commonName
- csr_content_cm.subject.organizationalUnitName == organizationalUnitName
- csr_content_cm.subject.organizationalUnitName == organizational
UnitName
- csr_content_cm.subject.organizationName == organizationName
- csr_content_cm.subject.localityName == localityName
- csr_content_cm.subject.stateOrProvinceName == stateOrProvinceName
Expand Down Expand Up @@ -187,7 +188,7 @@
that:
- csr_content_mp.subject.commonName == commonName
- csr_content_mp.subject.organizationalUnitName == organizational
UnitName
UnitName
- csr_content_mp.subject.organizationName == organizationName
- csr_content_mp.subject.localityName == localityName
- csr_content_mp.subject.stateOrProvinceName == stateOrProvinceName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
that:
- csr_content_cm.subject.commonName == commonName
- csr_content_cm.subject.organizationalUnitName == organizational
UnitName
UnitName
- csr_content_cm.subject.organizationName == organizationName
- csr_content_cm.subject.localityName == localityName
- csr_content_cm.subject.stateOrProvinceName == stateOrProvinceName
Expand Down Expand Up @@ -140,7 +140,7 @@
that:
- csr_content.subject.commonName == commonName
- csr_content.subject.organizationalUnitName == organizational
UnitName
UnitName
- csr_content.subject.organizationName == organizationName
- csr_content.subject.localityName == localityName
- csr_content.subject.stateOrProvinceName == stateOrProvinceName
Expand Down Expand Up @@ -182,8 +182,10 @@
- not generate_csr_mp.changed
- generate_csr_mp.msg == "Successfully performed the 'generate_csr' certificate operation."
- file_status_mp.stat.exists
- (generate_csr_mp.certificate_path | basename).startswith(idrac_ip)
- (generate_csr_mp.certificate_path | basename).endswith("_"+ cert_type + ".txt")
- (generate_csr_mp.certificate_path |
basename).startswith(idrac_ip)
- (generate_csr_mp.certificate_path |
basename).endswith("_"+ cert_type + ".txt")

- name: Get CSR info mandatory parameters
community.crypto.openssl_csr_info:
Expand All @@ -194,7 +196,8 @@
ansible.builtin.assert:
that:
- csr_content_mp.subject.commonName == commonName
- csr_content_mp.subject.organizationalUnitName == organizationalUnitName
- csr_content_mp.subject.organizationalUnitName == organizational
UnitName
- csr_content_mp.subject.organizationName == organizationName
- csr_content_mp.subject.localityName == localityName
- csr_content_mp.subject.stateOrProvinceName == stateOrProvinceName
Expand Down

0 comments on commit d2ab276

Please sign in to comment.