diff --git a/playbooks/upgrade_all_hosts.yml b/playbooks/upgrade_all_hosts.yml index fbb9135..358e642 100644 --- a/playbooks/upgrade_all_hosts.yml +++ b/playbooks/upgrade_all_hosts.yml @@ -8,11 +8,13 @@ upgrade: dist cache_valid_time: 3600 force_apt_get: true + - name: "Clean unwanted olderstuff" apt: autoremove: yes purge: yes clean: yes + - name: "Fix sysctl file" ansible.builtin.copy: src: ../config/sysctl.conf @@ -20,5 +22,6 @@ owner: "root" group: "root" mode: 0644 + - name: "Reboot all machines" ansible.builtin.reboot: diff --git a/playbooks/zabbix_agent_install.yml b/playbooks/zabbix_agent_install.yml index 369d2c5..72df569 100644 --- a/playbooks/zabbix_agent_install.yml +++ b/playbooks/zabbix_agent_install.yml @@ -25,8 +25,6 @@ name: zabbix-agent2 state: latest - - ansible.builtin.copy: content="{{ psk_key }}" dest=/etc/zabbix/key.psk - - name: Configure zabbix agent service ansible.builtin.template: src: ../templates/zabbix_agentd2.j2 @@ -35,13 +33,16 @@ group: zabbix mode: '0644' backup: yes + ansible.builtin.copy: + content: "{{ psk_key }}" + dest: /etc/zabbix/key.psk + - name: Create a config directory ansible.builtin.file: path: /etc/zabbix/zabbix_agentd.conf.d/ state: directory mode: '0755' - - name: Restart zabbix agent ansible.builtin.service: name: zabbix-agent2