Project

General

Profile

Bug #27417

foreman_scap_client_cron not working for ansible deployments.

Added by Ondřej Pražák 8 months ago. Updated 8 months ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1732818

Description of problem:
foreman_scap_client_cron not working for ansible deployments.

How reproducible:
always

Steps to Reproduce:
1. Create a host with scap configured via ansible.
2. Wait till scheduled cron time is complete.

Actual results:
- No reports generated even after scheduled cron time.

Expected results:
- Reports generated even after scheduled cron time.

Additional info:
- Issue seems to be occurring because of cron command in /etc/cron.d/foreman_scap_client_cron

  1. cat /etc/cron.d/foreman_scap_client_cron
  2. DO NOT EDIT THIS FILE MANUALLY
  3. IT IS MANAGED BY ANSIBLE
  4. ANY MANUAL CHANGES WILL BE LOST ON THE NEXT ANSIBLE EXECUTION #
  5. Executing foreman_scap_client from command line may be useful for debugging purposes.
  1. foreman_scap_client cron job
    */10 * * * * root "/bin/sleep 32; /usr/bin/foreman_scap_client 3 > /dev/null"

- after removing quotes the command runs fine.

- while same file when configured scap_client using puppet looks like

  1. cat /etc/cron.d/foreman_scap_client_cron
  2. DO NOT EDIT THIS FILE MANUALLY
  3. IT IS MANAGED BY PUPPET
  4. ANY MANUAL CHANGES WILL BE LOST ON THE NEXT PUPPET RUN #
  5. Executing foreman_scap_client from command line may be useful for debugging purposes.
  6. It may generate warnings due to a reference to a missing file.
  1. foreman_scap_client cron job
  1. Runs foreman_scap_client 1
    */30 * * * * root /bin/sleep 517 ; /usr/bin/foreman_scap_client 1 2>&1 | logger -t foreman_scap_client

History

#1 Updated by Marek Hulán 8 months ago

  • Status changed from New to Closed
  • Subject changed from foreman_scap_client_cron not working for ansible deployments. to foreman_scap_client_cron not working for ansible deployments.
  • Pull request https://github.com/theforeman/ansible-foreman_scap_client/pull/7 added

#2 Updated by Ondřej Pražák 8 months ago

  • Project changed from Ansible to OpenSCAP
  • Fixed in Releases ansible-foreman_scap_client 0.0.3 added

Also available in: Atom PDF