Open lpther opened 2 years ago
Why don't you set the organization in your playbook and loop through all orgs?
Why don't you set the organization in your playbook and loop through all orgs?
The "organizations" parameter is a list of organizations the proxy is assigned to. Looping through it would make it non idempotent.
From what I understand it is not related to the lifecycle environments.
Let me illustrate:
The organization parameter will set this association:
The lifecycle_environments parameter will associate the Name of the lifecycle environment, but cannot specify the Organization it belongs to. Making associating the Library or _default_lifecycleenvironment impossible via Ansible, since the LCE name is not unique.
An intuitive way to do so would be to pass a list of dict with the LCE name and Organization, instead of the LCE name only.
SUMMARY
Using the theforeman.foreman.smart_proxy lifecycle_environments parameter, having multiple lifecycle environments with the same name doesn't work.
ISSUE TYPE
ANSIBLE VERSION
COLLECTION VERSION
KATELLO/FOREMAN VERSION
STEPS TO REPRODUCE
EXPECTED RESULTS
Add all organization libraries to the smart proxy. Or even better, having a way to set the organization alongside the name like when doing the same via hammer:
hammer capsule content add-lifecycle-environment --name proxy.example.com --lifecycle-environment Library --organization Organization1
It seems to do a lookup on the LCEs name only, limiting how LCEs are defined (must use unique names) or simply preventing Library to be configured via Ansible.
ACTUAL RESULTS