Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

include_vars for __galaxy_ldap_packages #1485

Closed
onknows opened this issue Jun 25, 2023 · 3 comments
Closed

include_vars for __galaxy_ldap_packages #1485

onknows opened this issue Jun 25, 2023 · 3 comments

Comments

@onknows
Copy link

onknows commented Jun 25, 2023

IMHO include_vars should not be used because these vars have the highest priority and cannot be overridden. It is the hardest kind of hard coding. Vars in roles should not have a high priority because roles should be flexible and configurable.

include_vars should only be used in very specific circumstances when you absolutely know that something should not be configurable.

So for example when I use Ubuntu 22, provision will fail. Now I need to look for another Linux distribution because I cannot reconfigure the galaxy __galaxy_ldap_packages. Vars via include_vars are very different from vars via normal defaults vars in a role. A point which I try to make from time to time see for example What's the difference between defaults and vars in an Ansible role?](https://stackoverflow.com/questions/29127560/whats-the-difference-between-defaults-and-vars-in-an-ansible-role/58078985#58078985)

A better and more flexible way to do this is to use a var pulp_galaxy_ldap_packages:

pulp_galaxy_ldap_packages:
  Debian:
  - ldap-utils
  - ldapvi
  - libldap-common
  - libldap-dev
  - python-dev
  - libldap2-dev
  - libsasl2-dev
  - libssl-dev
  CentOS:
  - etc
TASK [pulp.pulp_installer.pulp_common : Install dependencies for LDAP support via apt] ***
fatal: [c2d-galaxy1]: FAILED! => {"changed": false, "msg": "No package matching 'python-dev' is available"}

ansible_collections/pulp/pulp_installer/roles/pulp_common/vars/Debian.yml

__galaxy_ldap_packages:
  - ldap-utils
  - ldapvi
  - libldap-common
  - libldap-dev
  - python-dev
  - libldap2-dev
  - libsasl2-dev
  - libssl-dev
@mikedep333
Copy link
Member

Hi @onknows

pulp_installer is retired and not supported anymore. I am about to put up the notice.

We will not be making any further changes like this. Sorry 😔

@stale
Copy link

stale bot commented Oct 18, 2023

This issue has been marked 'stale' due to lack of recent activity. If there is no further activity, the issue will be closed in another 30 days. Thank you for your contribution!

@stale stale bot added the stale label Oct 18, 2023
Copy link

stale bot commented Nov 17, 2023

This issue has been closed due to inactivity. If you feel this is in error, please reopen the issue or file a new issue with the relevant details.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Archived in project
Development

No branches or pull requests

2 participants