Problem:
How to execute openscap scanning in ansible from command line?How to execute openscap scanning in ansible from command line instead of running it from the foreman UI?
Expected outcome:
Scanning should work from ansible playbook
Other relevant data:
Openscap scanning is working fine from the UI and I have to replicate the same working through ansible playbook. Currently I have this playbook which creates config file and corn but the scanning is not happening.
- hosts: vsphere
become: true
roles:
- theforeman.foreman_scap_client
vars:
foreman_scap_client_server: 192.168.1.37
foreman_scap_client_port: 9090
foreman_scap_client_policies: [{
"id": "2",
"hour": "12",
"minute": "1",
"month": "*",
"monthday": "*",
"weekday": "1",
"profile_id": "2",
"content_path": "/var/lib/openscap/content/c125daafac369e94f734e6b4e69849894f70373eb1133678e219b554338eb2d.xml",
"download_path": "/compliance/policies/2/content/c125daafac369e94f74e6b4e69f849894f70373eb1133678e219b554338eb2d",
"tailoring_path": "",
"tailoring_download_path": ""
}]
Any help would be appreciated