Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove update_cache or make it optional #63

Closed
mweinelt opened this issue Sep 10, 2021 · 3 comments · Fixed by #64
Closed

Remove update_cache or make it optional #63

mweinelt opened this issue Sep 10, 2021 · 3 comments · Fixed by #64

Comments

@mweinelt
Copy link
Contributor

mweinelt commented Sep 10, 2021

In the step that ensure unzip is installed to the managed hosts you are setting update_cache: yes.

- name: Ensure unzip package is available
package:
name: unzip
state: present
update_cache: True

Would it be a reasonable ask to let administrators handle update_cache themselves, so apt-get update is only executed once per run, instead of possibly multiple times, due to this role forcing it?

@patrickjahns
Copy link
Owner

If we are not updating the cache per default, I fear that the installation might fail for people who are not aware, that they need to have updated the cache themselves first. In my mind this leads to a bad default experience with ansible roles.

I'd be open for a suggestion how to best handle this. Do you know of any convention (i.e. a specific variable name) that we could use to conditionally enable/disable the behaviour ?

@mweinelt
Copy link
Contributor Author

mweinelt commented Sep 10, 2021

If we are not updating the cache per default, I fear that the installation might fail for people who are not aware, that they need to have updated the cache themselves first. In my mind this leads to a bad default experience with ansible roles.

I see.

I'd be open for a suggestion how to best handle this. Do you know of any convention (i.e. a specific variable name) that we could use to conditionally enable/disable the behaviour ?

I'm unaware of any convention, sorry. Making it a variable, that is default true, so we could opt-out of the behaviour would be great.

@patrickjahns
Copy link
Owner

I'm unaware of any convention, sorry. Making it a variable, that is default true, so we could opt-out of the behaviour would be great.

Sounds like a good compromise to me - happy to get a PR and would gladly build a new release 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants