apt_all is broken on (old?) Ubuntu.

This commit is contained in:
Julien Palard 2023-03-28 14:11:57 +02:00
parent 7c2c8b7775
commit c0793b34a4
Signed by: mdk
GPG Key ID: 0EFC1AC1006886F8
1 changed files with 9 additions and 6 deletions

View File

@ -48,12 +48,15 @@
dest: /etc/munin/plugins/apt_all
state: link
notify: munin
when: ansible_facts['distribution'] == "Debian"
- name: Remove native munin apt update
# It is no longer supported
# and raises errors.
# The doc tells to use APT::Periodic::Update-Package-Lists "1"; instead.
ansible.builtin.lineinfile:
path: /etc/cron.d/munin-node
# It does not work on Ubuntu, it's giving:
# E: The value 'stable' is invalid for APT::Default-Release as such a release is not available in the sources
# E: The value 'testing' is invalid for APT::Default-Release as such a release is not available in the sources
# E: The value 'unstable' is invalid for APT::Default-Release as such a release is not available in the sources
file:
path: /usr/share/munin/plugins/apt_all
state: absent
regexp: '/etc/munin/plugins/apt_all update'
notify: munin
when: ansible_facts['distribution'] == "Ubuntu"