Ansible Script 추가

This commit is contained in:
ByeonJungHun
2023-12-19 13:36:16 +09:00
parent 0273450ff6
commit 05cb8d9269
2610 changed files with 281893 additions and 0 deletions

View File

@@ -0,0 +1,25 @@
---
- name: Pull service facts
ansible.builtin.service_facts:
- name: 'Remove | Make sure the "old" zabbix-agent service stopped'
ansible.builtin.service:
name: "zabbix-agent"
state: stopped
enabled: false
become: true
when: |
ansible_facts.services["zabbix-agent.service"] is defined or
ansible_facts.services["zabbix-agent"] is defined
- name: "Remove | Package removal"
ansible.builtin.package:
name: "zabbix-agent"
state: absent
become: true
- name: "Remove | Remove the agent-include-dir"
ansible.builtin.file:
path: "{{ zabbix_agent_include }}"
state: absent
become: true