You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The job invocation module, when used to schedule recurring jobs, should be idempotent based on recurrence.purpose. At present (in FAM 4.0.0 against upstream foreman 1.10/Katello 4.12) it fails.
When running this playbook twice, the second run should return OK and not change anything. If the parameters of the job have changed, it should change them and report changed.
ACTUAL RESULTS
The first fun of the playbook creates the job as expected. That part is fine.
Subsequent runs error out, with messages like this:
TASK [Set up programmatic job invocations (failures ok)] *******************************************
fatal: [localhost]: FAILED! => {"changed": false, "error": {"message": "Validation failed: Triggering: Purpose Active or disabled recurring logic with purpose System update already exists"}, "msg": "Error while performing create on job_invocations: 500 Server Error: Internal Server Error for url: https://srv-katello.imladris.lan/api/job_invocations"}
```
The text was updated successfully, but these errors were encountered:
This behavior is related to the API not to this module. When hammer CLI is used, you will get the same output or error. The developer of this module could maybe, as a solution, handle the API return code or its results in a better way without braking the playbook or Ansible run.
At present, it seems the job_invocations module does not support removal of jobs (e.g. via state: absent, Maybe that should be a separate issue, but in some ways I think it's related...foreman does treat recurring logics as a somewhat separate entity
SUMMARY
The job invocation module, when used to schedule recurring jobs, should be idempotent based on recurrence.purpose. At present (in FAM 4.0.0 against upstream foreman 1.10/Katello 4.12) it fails.
ISSUE TYPE
ANSIBLE VERSION
COLLECTION VERSION
KATELLO/FOREMAN VERSION
STEPS TO REPRODUCE
EXPECTED RESULTS
When running this playbook twice, the second run should return OK and not change anything. If the parameters of the job have changed, it should change them and report changed.
ACTUAL RESULTS
The first fun of the playbook creates the job as expected. That part is fine.
Subsequent runs error out, with messages like this:
The text was updated successfully, but these errors were encountered: