nagios-nrpe: old wrapper might be missing
This commit is contained in:
parent
70be09342b
commit
d3765ada56
|
@ -5,10 +5,16 @@
|
||||||
include_role:
|
include_role:
|
||||||
name: remount-usr
|
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
|
- name: alerts_switch is at the right place
|
||||||
command: "mv /usr/share/scripts/alerts_switch /usr/local/bin/alerts_switch"
|
command: "mv /usr/share/scripts/alerts_switch /usr/local/bin/alerts_switch"
|
||||||
args:
|
args:
|
||||||
creates: /usr/local/bin/alerts_switch
|
creates: /usr/local/bin/alerts_switch
|
||||||
|
when: old_alerts_switch.stat.exists
|
||||||
|
|
||||||
- name: "copy alerts_switch"
|
- name: "copy alerts_switch"
|
||||||
copy:
|
copy:
|
||||||
|
@ -24,6 +30,7 @@
|
||||||
src: /usr/local/bin/alerts_switch
|
src: /usr/local/bin/alerts_switch
|
||||||
dest: /usr/share/scripts/alerts_switch
|
dest: /usr/share/scripts/alerts_switch
|
||||||
state: link
|
state: link
|
||||||
|
when: old_alerts_switch.stat.exists
|
||||||
|
|
||||||
- name: "copy alerts_wrapper"
|
- name: "copy alerts_wrapper"
|
||||||
copy:
|
copy:
|
||||||
|
|
Loading…
Reference in a new issue