theforeman / ansible-foreman_scap_client

GNU General Public License v3.0
4 stars 13 forks source link

cron.j2 generates incorrect command line #45

Closed kkeane closed 2 weeks ago

kkeane commented 2 years ago

The cron.j2 template generates the following command line (part of it):

1 12 1 root /bin/sleep 120; /usr/bin/foreman_scap_client ds 1 2>&1 | logger -t foreman_scap_client

Correct would be:

1 12 1 root /bin/sleep 120; /usr/bin/foreman_scap_client 1 2>&1 | logger -t foreman_scap_client

(the ds argument is unnecessary causes an error). When foreman_scap_client is called with the arguments ds 1, it produces the following error message:

Usage: /usr/bin/foreman_scap_client policy_id where policy_id is a key used in config file

Tested with rubygem-foreman_scap_client-0.4.7-1.el7sat.noarch on RHEL 7 with Satellite Server 6.9

mipsou commented 1 year ago

I think a rework is needed

  1. check version package when option ds and oval appear
  2. give option empty when is not need or choose ds or oval
  3. etc...
adamruzicka commented 2 weeks ago

This shouldn't be an issue with foreman_scap_client-0.5.0 and newer, which supports both foreman_scap_client ds 1 and foreman_scap_client 1