dellemc-openmanage-ansible-modules
dellemc-openmanage-ansible-modules copied to clipboard
[BUG]: ome_configuration_compliance_info with device_id specified is giving back an empty list
Bug Description
When specifying an device_id. The given output for the compliance is empty.
Component or Module Name
ome_configuration_compliance_info
Ansible Version
2.10.17
Python Version
3.6.8
iDRAC/OME/OME-M version
OME: Version 3.9.0 (Build 55)
Operating System
Red Hat Enterprise Linux Server release 7.9
Playbook Used
- name: Retrieve compliance report for baseline dellemc.openmanage.ome_configuration_compliance_info: hostname: "{{ ome_server }}" username: "{{ ome_username }}" password: "{{ ome_password }}" baseline: "{{ baseline }}" device_id: "{{ device_id }}" delegate_to: localhost register: baseline_report
Logs
ok: [servername] => { "baseline_report": { "changed": false, "compliance_info": [], "failed": false } }
Steps to Reproduce
run the following task
- name: Retrieve compliance report for baseline dellemc.openmanage.ome_configuration_compliance_info: hostname: "{{ ome_server }}" username: "{{ ome_username }}" password: "{{ ome_password }}" baseline: "{{ baseline }}" device_id: "{{ device_id }}" delegate_to: localhost register: baseline_report
Expected Behavior
compliance_info is not empty
Actual Behavior
compliance_info is empty
Screenshots
No response
Additional Information
No response
I've just done some more tests. I looks like the compliance report is having some paging of 20 devices. When I run the Report for all devices I get only 20 devices back:
skipping: [server1] => (item=10559)
skipping: [server2] => (item=10560)
skipping: [server3] => (item=10565)
skipping: [server4] => (item=10569)
skipping: [server5] => (item=10571)
skipping: [server6] => (item=10566)
skipping: [server7] => (item=10568)
skipping: [server8] => (item=10567)
skipping: [server9] => (item=10570)
skipping: [server10] => (item=10574)
skipping: [server11] => (item=10575)
skipping: [server12] => (item=10577)
skipping: [server13] => (item=10590)
skipping: [server14] => (item=10592)
skipping: [server15] => (item=10602)
skipping: [server16] => (item=10596)
ok: [server17] => (item=10597)
skipping: [server18] => (item=10600)
skipping: [server19] => (item=10606)
skipping: [server20] => (item=10604)
So I've put over 40 Servern in a group, when I then run the report with a device_id specified. And I get an empty Report:
TASK [Retrieve compliance report for baseline] **********************************************************************************************************************************************************************************************
ok: [server1 -> localhost]
TASK [debug] ********************************************************************************************************************************************************************************************************************************
ok: [server1] => {
"baseline_report": {
"changed": false,
"compliance_info": [],
"failed": false
}
}
With just 20 Devices it's working fine.
ok: [server1] => {
"baseline_report": {
"changed": false,
"compliance_info": [
{
"@odata.id": "/api/TemplateService/Baselines(5)/DeviceConfigComplianceReports(10597)",
"@odata.type": "#TemplateService.DeviceConfigComplianceReports",
"ComplianceAttributeGroups": [
{
"Attributes": [],
"ComplianceReason": "The target device(s) are missing inventory or compliance is not finished.",
"ComplianceStatus": 3,
"ComplianceSubAttributeGroups": [
{
@noesberger Thanks for reporting the issue.
Checked the module , looks like there are two different API calls on the same URI for the below two actions.
- To fetch report there is no pagination added and same is returned back from the module as output by cheking the device_is/device_service_tag.
- To validate the device_id or device_service_tag where there is a pagination added. And hence the module is not throwing error as device_id/device_service_tag exists with the paginated data, and is returning the empty output as the return data is based on non paginated data.
@anupamaloke FYI.