You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

75 lines
1.7 KiB

# Enable monitoring
- name: install packages for monitoring
apt:
name:
- xinetd
state: latest
- name: Copy check_mk agent to target
copy:
src: check-mk-agent_1.6.0p11-1_all.deb
dest: /tmp/check-mk-agent_1.6.0p11-1_all.deb
owner: root
group: root
mode: 0644
- name: Install check-mk-agent
apt: deb="/tmp/check-mk-agent_1.6.0p11-1_all.deb"
- name: check if ufw is installed
stat:
path: /usr/sbin/ufw
register: ufw
- name: Copy ufw rules to target
copy:
src: files/check_mk.ufw
dest: /etc/ufw/applications.d/checkmk
owner: root
group: root
mode: 0644
when: ufw.stat.exists
- name: allow check_mk in ufw
ufw:
rule: allow
name: checkmk
state: enabled
when: ufw.stat.exists
- name: Copy checkbbb_from_chost.sh to /usr/lib/check_mk_agent/local on target
copy:
src: checkbbb_from_chost.sh
dest: /usr/lib/check_mk_agent/local/checkbbb_from_chost.sh
owner: root
group: root
mode: 0700
when: "'b3srv' in inventory_hostname"
- name: Copy check_kurentoload.sh to /usr/lib/check_mk_agent/local on target
copy:
src: check_kurentoload.sh
dest: /usr/lib/check_mk_agent/local/check_kurentoload.sh
owner: root
group: root
mode: 0700
when: "'b3srv' in inventory_hostname"
- name: Copy check_coturn.sh to /usr/lib/check_mk_agent/local on target
copy:
src: check_coturn.sh
dest: /usr/lib/check_mk_agent/local/check_coturn.sh
owner: root
group: root
mode: 0700
when: "'turn' in inventory_hostname"
- name: Copy template to xinetd check_mk config
template:
src: xinetd_check_mk.j2
dest: /etc/xinetd.d/check_mk
owner: root
group: root
mode: '0644'
notify: Restart xinetd