Closed nesanton closed 4 years ago
Also linking: https://github.com/ansible/ansible/pull/58070
@mdellweg didn't I once saw a playbook of yours where you used some YaML reference or so to pass the connection parameters? It's not the same but still makes life easier.
Like here: https://github.com/mdellweg/pulp_ansible_modules/blob/master/tests/playbooks/file_distribution.yaml#L55 Yes, but its scope is limited to one file.
I learnt to live with either yaml references like @mdellweg's or this:
vars:
foreman_api:
server_url: https://blah.blah.com
username: blah
password: blahblah
validate_certs: no
module_defaults:
foreman_this: "{{ foreman_api }}"
foreman_that: "{{ foreman_api }}"
katello_here: "{{ foreman_api }}"
or the combination of two.
Anyway, closing this, because it seems to be (or going to be) sort of solvable by module grouping.
SUMMARY
When many foreman and katello modules are used in a play one might find it frustrating having to scecify the very same
server_url
,username
,password
,validate_certs
all the time. And it's not really possible to usemodule_defaults
, because one can't seem to wildcard them like foreman*.Idea is to add an extra variable to all the modules and nest these underneath:
This way it's only one var to feed to any module. I guess it can coexist with the current way.
ISSUE TYPE