redhat-cop / ee_utilities

This ansible collection includes a number of roles and tools which can be useful for managing Ansible Execution Environments.
https://galaxy.ansible.com/infra/ee_utilities
GNU General Public License v3.0
57 stars 34 forks source link

Default value of ee_base_registry_username is declared as ee_registry_username in README.md when in fact ee_registry_username default value is ee_base_registry_username #133

Open osiengse opened 1 year ago

osiengse commented 1 year ago

Summary

Default value of ee_base_registry_username & ee_base_registry_password is declared as ee_registry_username & ee_registry_password in README.md when in fact ee_registry_username & ee_registry_password default value is ee_base_registry_username & ee_base_registry_password

Issue Type



# Desired Behavior

Default value of ee_base_registry_username and ee_base_registry_password declared in default folder must reflect what has been stated in README.md

# Actual Behavior

Default value of ee_base_registry_username & ee_base_registry_password is declared as ee_registry_username & ee_registry_password in README.md when in fact ee_registry_username & ee_registry_password default value is ee_base_registry_username & ee_base_registry_password

https://github.com/redhat-cop/ee_utilities/blob/763646409558e5ebbd29407768ad96321d518371/roles/ee_builder/README.md?plain=1#L57

[ee_registry_username: "{{ ee_base_registry_username | default(omit, true) }}"](https://github.com/redhat-cop/ee_utilities/blob/763646409558e5ebbd29407768ad96321d518371/roles/ee_builder/defaults/main.yml#L11C1-L11C21)
sean-m-sullivan commented 12 months ago

Sorry I missed this, I've been overwhelmed.

Your PR is not the right solution.

There are few scenarios envisioned.

The most common that the role tries to default to, in this order:

  1. The base image and the destination registry are the same, so they use the same authentication. This is why the base user/pass defaults to the ee_registery user/pass, its assuming you are pulling/pushing from/to a galaxy/automation hub

  2. You are pulling the base image from registry.redhat.io, or someplace like a private repository separate from the destionation. This means you set the base auth different from the destionation auth, as you cannot write to the base auth

  3. You are pulling from a public repo that doesn't need authentication, so you would set the base user/pass as "" This is the least likely scenario, as you are more likely to use ee_update_base_images set to false to not pull base images from the start.

Trying to figure out how to make this better for documentation, but these are the cases its built around, If you have a case that doesn't match these 3, comment here, and can figure out how best to change things. However change the behavior as you've set out would break things for users as is.