Files
role-check-mk-agent/tasks/RedHat.yml

37 lines
871 B
YAML
Raw Normal View History

2020-10-13 16:33:32 +13:00
---
# Tasks for installation on RedHat Family
- name: Ensure xinetd installed
yum:
name: xinetd
state: installed
notify: restart xinetd
- name: Gather facts of packages
package_facts:
manager: "auto"
- name: Install check-mk-agent
block:
- name: Download the agent from Server
get_url:
url: "{{ cmk_rpm_agent }}{{ cmk_auth }}"
dest: /tmp/check-mk-agent.rpm
- name: Ensure check_mk_agent installed
2020-10-13 23:40:02 +13:00
yum:
2020-10-13 16:33:32 +13:00
name: /tmp/check-mk-agent.rpm
state: installed
2020-10-13 23:40:02 +13:00
notify:
2020-10-13 16:33:32 +13:00
- restart xinetd
- cmk fresh install
2020-10-15 14:23:17 +13:00
- ensure firewall open
- ensure firewall reloaded
2020-10-13 16:33:32 +13:00
- name: Remove agent Download
file:
path: /tmp/check-mk-agent.rpm
state: absent
when: "'check-mk-agent' not in ansible_facts.packages or cmk_force_install"
2020-10-13 16:33:32 +13:00
tags:
- check_mk_agent