mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-08-03 23:26:58 +02:00
Update to 2021-12-01 19:13
This commit is contained in:
9
playbooks/update_all.yml
Normal file
9
playbooks/update_all.yml
Normal 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'
|
||||
|
7
playbooks/update_cacertificates.yml
Normal file
7
playbooks/update_cacertificates.yml
Normal file
@@ -0,0 +1,7 @@
|
||||
---
|
||||
|
||||
- name: Update ca-certificates
|
||||
hosts: '*'
|
||||
tasks:
|
||||
- name: Update ca-certificates
|
||||
package: name=ca-certificates state=latest
|
42
playbooks/update_zabbix.yml
Normal file
42
playbooks/update_zabbix.yml
Normal 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
|
Reference in New Issue
Block a user