geerlingguy / ansible-role-mysql

Ansible Role - MySQL
https://galaxy.ansible.com/geerlingguy/mysql/
MIT License
1.05k stars 861 forks source link

Make apt update_cache optional or ignore errors #512

Closed baedorf closed 1 year ago

baedorf commented 1 year ago

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 _ignoreerrors: 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 _ingoreerrors on task level or to disable update cache?

stale[bot] commented 1 year ago

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.

github-actions[bot] commented 1 year ago

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.