🎨: use ansible.builtin.package with update_cache systematically

This commit is contained in:
VC
2024-11-06 13:34:03 +01:00
parent 7da2514a93
commit b910bf5e3d
38 changed files with 114 additions and 94 deletions

View File

@@ -20,6 +20,7 @@
ansible.builtin.package:
name: "{{ item }}"
state: present
update_cache: true
loop: "{{ muninpkgs }}"
- name: Put munin-node configuration file
@@ -37,6 +38,7 @@
ansible.builtin.package:
name: libwww-perl
state: present
update_cache: true
notify:
- Restart munin-node
when: "'webservers' in group_names or 'loadbalancers' in group_names"
@@ -58,6 +60,7 @@
- libcache-cache-perl
- libdbd-mysql-perl
state: present
update_cache: true
notify:
- Restart munin-node
when: "'mariadbservers' in group_names"
@@ -67,6 +70,7 @@
ansible.builtin.package:
name: libdbd-pg-perl
state: present
update_cache: true
notify:
- Restart munin-node
when: "'pgsqlservers' in group_names"
@@ -114,8 +118,12 @@
ansible.builtin.include_tasks: zfs.yml
when: "'zfsservers' in group_names"
- name: Execute specific physical servers commands
ansible.builtin.include_tasks: physicalservers.yml
# Adding modules for physical servers
- name: Install physical sensors
ansible.builtin.package:
name: lm-sensors
state: present
update_cache: true
when: "'physicalservers' in group_names"
# Specific LXC commands