You've already forked role-check-mk-agent
Initial Commit
This commit is contained in:
34
tasks/RedHat.yml
Normal file
34
tasks/RedHat.yml
Normal file
@@ -0,0 +1,34 @@
|
||||
---
|
||||
# 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
|
||||
yum:
|
||||
name: /tmp/check-mk-agent.rpm
|
||||
state: installed
|
||||
notify:
|
||||
- restart xinetd
|
||||
- cmk fresh install
|
||||
|
||||
- name: Remove agent Download
|
||||
file:
|
||||
path: /tmp/check-mk-agent.rpm
|
||||
state: absent
|
||||
when: "'check-mk-agent' not in ansible_facts.packages"
|
||||
tags:
|
||||
- check_mk_agent
|
||||
Reference in New Issue
Block a user