nagios-nrpe: old wrapper might be missing

This commit is contained in:
Jérémy Lecour 2023-02-01 11:27:16 +01:00 committed by Jérémy Lecour
parent 70be09342b
commit d3765ada56
1 changed files with 7 additions and 0 deletions

View File

@ -5,10 +5,16 @@
include_role:
name: remount-usr
- name: check if old script is present
stat:
path: /usr/share/scripts/alerts_switch
register: old_alerts_switch
- name: alerts_switch is at the right place
command: "mv /usr/share/scripts/alerts_switch /usr/local/bin/alerts_switch"
args:
creates: /usr/local/bin/alerts_switch
when: old_alerts_switch.stat.exists
- name: "copy alerts_switch"
copy:
@ -24,6 +30,7 @@
src: /usr/local/bin/alerts_switch
dest: /usr/share/scripts/alerts_switch
state: link
when: old_alerts_switch.stat.exists
- name: "copy alerts_wrapper"
copy: