redhat-cop / aap_utilities

Ansible Collection for automated deployment of AAP and other objects for general use
https://galaxy.ansible.com/infra/aap_utilities
GNU General Public License v3.0
74 stars 44 forks source link

handle passwords in aap_setup_prep_inv_secrets #150

Closed jce-redhat closed 1 year ago

jce-redhat commented 1 year ago

What does this PR do?

modifies the aap_setup_install role to use credentials from the aap_setup_prep_inv_secrets variable if defined

Brief explanation of the code or documentation change you've made

the aap_setup_install role uses controller and hub credentials when checking that the components are running both before and after the setup script is run. however, it only used credentials defined in aap_setup_prep_inv_vars, but according to the aap_setup_prep role they can also be defined in aap_setup_prep_inv_secrets. this PR modifies the tasks to use either, preferring credentials in aap_setup_prep_inv_secrets over those in aap_setup_prep_inv_vars.

How should this be tested?

only set controller and hub credentials in aap_setup_prep_inv_secrets when installing AAP. before this change, running the aap_setup_install role would fail when checking if controller or hub were running if the credentials were only set in this variable.

Is there a relevant Issue open for this?

no

Provide a link to any open issues that describe the problem you are solving. resolves #[number]

n/a

Please provide link to other PRs that may be related (blocking, resolves, etc. etc.)

n/a

jce-redhat commented 1 year ago

thanks for the feedback @Tompage1994! i wasn't sure about the changelog snippet since i didn't know if you roll up PRs into releases or if you want something per change. EDIT: but now that i think about it, i guess the fragments need to be there for when a release is cut....

the variables are already documented in (roles/aap_setup_prep/README.md), but i found if i set the controller and hub passwords in aap_setup_prep_inv_secrets only, they were never referenced during the checks for controller and hub availability. that's what lead to this PR.