[kvmstats] Replace old kvmstats script if it exists
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
8cdb5e409c
commit
e03cf46089
|
@ -29,6 +29,17 @@
|
||||||
dest: /var/www/index.html
|
dest: /var/www/index.html
|
||||||
insertbefore: '</ul>'
|
insertbefore: '</ul>'
|
||||||
line: '<li><a href="/kvmstats.html">kvmstats</a></li>'
|
line: '<li><a href="/kvmstats.html">kvmstats</a></li>'
|
||||||
|
- name: old kvmstats exists
|
||||||
|
stat:
|
||||||
|
path: /usr/sbin/kvmstats
|
||||||
|
register: oldkvmstats
|
||||||
|
- name: kvmstats is dead, long live kvmstats!
|
||||||
|
file:
|
||||||
|
state: link
|
||||||
|
src: /usr/share/scripts/kvmstats
|
||||||
|
path: /usr/sbin/kvmstats
|
||||||
|
force: yes
|
||||||
|
when: oldkvmstats.stat.islnk is defined and oldkvmstats.stat.islnk == False
|
||||||
|
|
||||||
post_tasks:
|
post_tasks:
|
||||||
- include_role:
|
- include_role:
|
||||||
|
|
Loading…
Reference in a new issue