[kvmstats] Replace old kvmstats script if it exists
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Alexis Ben Miloud--Josselin 2021-01-19 11:37:52 +01:00
parent 8cdb5e409c
commit e03cf46089
1 changed files with 11 additions and 0 deletions

View File

@ -29,6 +29,17 @@
dest: /var/www/index.html
insertbefore: '</ul>'
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:
- include_role: