aap_setup_install assumes dictionaries in aap_setup_prep_inv_nodes var
jon4hz opened this issue · comments
Hi, quick follow up to #192 because I figured out what caused my issue.
This should probably be something like {{ aap_setup_prep_inv_nodes['automationcontroller'] | first }}
. Same goes for ah_hostname
and eda_hostname
- or you keep the role as it is and adjust the example in the readme :)
Can you point to me where in the documentation it shows dicts, as we would need to change that, I've looked at the aap setup install, download, and prep, and I see lists used in the examples. Its never meant to be a dict. ever.
It doesn't show dicts in any documentation. The issue is that the defaults from the aap_setup_install assume dicts.
See the code snippets above. You're calling the keys()
method on aap_setup_prep_inv_nodes['automationcontroller']
which will throw the error: 'list object' has no attribute 'keys'
.
This behavior was introduced by #133 as "fix hostnames".
They should all be dictionaries and they can all be dictionaries, in order to allow for host variables in the ini files (not the nicest way to do it, but rather common for setup.sh). The truth was and is in aap_setup_prepare
: "aap_setup_prep_inv_nodes
[...] a dictionary of dictionaries, the first level key is the inventory group name, the 2nd level key is the hostname with the value being its inventory host variables in INI-format".