cleaning up alpine code
This commit is contained in:
parent
251d2d6135
commit
1f360085d9
|
@ -13,15 +13,6 @@
|
|||
state: latest
|
||||
when: ansible_os_family == "Debian"
|
||||
|
||||
#######################################
|
||||
- name: Installed nagios agent packages (Alpine)
|
||||
apk:
|
||||
name:
|
||||
- nrpe
|
||||
- monitoring-plugins
|
||||
state: latest
|
||||
when: ansible_os_family == "Alpine"
|
||||
|
||||
#######################################
|
||||
- name: Get list of groups
|
||||
getent:
|
||||
|
@ -45,16 +36,6 @@
|
|||
group: root
|
||||
when: ("docker" in ansible_facts.getent_group) and ansible_os_family == "Debian"
|
||||
|
||||
#######################################
|
||||
- name: Copy check_docker.sh from https://github.com/sysC0D/nagios-plugin (if docker group exists) (Alpine)
|
||||
get_url:
|
||||
url: https://raw.githubusercontent.com/sysC0D/nagios-plugin/master/check_docker.sh
|
||||
dest: /usr/lib/monitoring-plugins/check_docker.sh
|
||||
mode: "0755"
|
||||
owner: root
|
||||
group: root
|
||||
when: ("docker" in ansible_facts.getent_group) and ansible_distribution == "Alpine"
|
||||
|
||||
#######################################
|
||||
- name: copy check_mount.sh file to /lib/nagios/plugins (Debian based distros)
|
||||
template:
|
||||
|
@ -65,16 +46,6 @@
|
|||
group: root
|
||||
when: ansible_os_family == "Debian"
|
||||
|
||||
#######################################
|
||||
- name: copy check_mount.sh file to /lib/nagios/plugins (Alpine)
|
||||
template:
|
||||
src: files/check_mount.sh
|
||||
dest: /usr/lib/monitoring-plugins/check_mount.sh
|
||||
mode: "0755"
|
||||
owner: root
|
||||
group: root
|
||||
when: ansible_distribution == "Alpine"
|
||||
|
||||
#######################################
|
||||
- name: copy nrpe.cfg file to /etc/nagios (Debian based distros)
|
||||
template:
|
||||
|
@ -85,16 +56,6 @@
|
|||
group: root
|
||||
when: ansible_os_family == "Debian"
|
||||
|
||||
#######################################
|
||||
- name: copy nrpe.cfg file to /etc (Alpine)
|
||||
template:
|
||||
src: files/alp_nrpe.cfg.j2
|
||||
dest: /etc/nrpe.cfg
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: root
|
||||
when: ansible_distribution == "Alpine"
|
||||
|
||||
#######################################
|
||||
- name: copy nrpe_local.cfg to /etc/nagios (Debian based distros)
|
||||
template:
|
||||
|
@ -105,16 +66,6 @@
|
|||
group: root
|
||||
when: ansible_os_family == "Debian"
|
||||
|
||||
#######################################
|
||||
- name: copy nrpe_local.cfg to /etc (Alpine)
|
||||
template:
|
||||
src: files/alp_nrpe_local.cfg.j2
|
||||
dest: /etc/nrpe_local.cfg
|
||||
mode: "0644"
|
||||
owner: root
|
||||
group: root
|
||||
when: ansible_distribution == "Alpine"
|
||||
|
||||
#######################################
|
||||
- name: Restart and enable nagios-nrpe-server service (Debian based distros)
|
||||
service:
|
||||
|
@ -123,12 +74,4 @@
|
|||
state: restarted
|
||||
when: ansible_os_family == "Debian"
|
||||
|
||||
#######################################
|
||||
- name: Restart and enable nagios-nrpe-server service (Alpine)
|
||||
service:
|
||||
name: nrpe
|
||||
enabled: true
|
||||
state: restarted
|
||||
when: ansible_distribution == "Alpine"
|
||||
|
||||
# EOF
|
||||
|
|
Loading…
Reference in New Issue