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

Make apt update_cache optional or ignore errors #512

Closed
baedorf opened this issue Dec 21, 2022 · 2 comments
Closed

Make apt update_cache optional or ignore errors #512

baedorf opened this issue Dec 21, 2022 · 2 comments
Labels

Comments

@baedorf
Copy link

baedorf commented Dec 21, 2022

I try to execute the role on Ubuntu 20.04.5 LTS and always get failed while performing

- name: Update apt cache if MySQL is not yet installed.
  apt: update_cache=yes
  changed_when: False
  when: not mysql_installed.stat.exists

This could be because of organizational policy/restriction.
mysql can be installed even if cache was not updated.
To do this, I added ignore_errors: true in playbook, but this means that every error is ignored and not only update cache.
Would it be possible to add a variable and use this for ingore_errors on task level or to disable update cache?

@stale
Copy link

stale bot commented Mar 25, 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!

Please read this blog post to see the reasons why I mark issues as stale.

@stale stale bot added the stale label Mar 25, 2023
@github-actions
Copy link

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.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant