Update to 2021-12-01 19:13

This commit is contained in:
Daniel Berteaud
2021-12-01 19:13:34 +01:00
commit 4c4556c660
2153 changed files with 60999 additions and 0 deletions

9
playbooks/update_all.yml Normal file
View File

@@ -0,0 +1,9 @@
---
- name: Update everything
hosts: '*'
tasks:
- yum: name='*' state=latest
when: ansible_os_family == 'RedHat'
- apt: name='*' state=latest
when: ansible_os_family == 'Debian'

View File

@@ -0,0 +1,7 @@
---
- name: Update ca-certificates
hosts: '*'
tasks:
- name: Update ca-certificates
package: name=ca-certificates state=latest

View File

@@ -0,0 +1,42 @@
---
- name: Update Zabbix
hosts: '*'
tasks:
- yum:
name:
- zabbix-agent
- zabbix-agent-addons
state: latest
when: ansible_os_family == 'RedHat'
notify: restart zabbix-agent
- apt:
name:
- zabbix-agent
update_cache: True
state: latest
when: ansible_os_family == 'Debian'
notify: restart zabbix-agent
- git:
repo: https://git.fws.fr/fws/zabbix-agent-addons.git
dest: /var/lib/zabbix/addons
register: zabbix_agent_addons_git
when: ansible_os_family == 'Debian'
notify: restart zabbix-agent
- shell: cp -af /var/lib/zabbix/addons/{{ item.src }}/* {{ item.dest }}/
with_items:
- { src: zabbix_conf, dest: /etc/zabbix/zabbix_agentd.conf.d }
- { src: zabbix_scripts, dest: /var/lib/zabbix/bin }
- { src: lib, dest: /usr/local/lib/site_perl }
when:
- zabbix_agent_addons_git.changed
- ansible_os_family == 'Debian'
- shell: chmod +x /var/lib/zabbix/bin/*
args:
warn: False
when:
- zabbix_agent_addons_git.changed
- ansible_os_family == 'Debian'
handlers:
- name: restart zabbix-agent
service: name=zabbix-agent state=restarted