From e03cf4608967f694638b629573aa3e7949fc5318 Mon Sep 17 00:00:00 2001 From: Alexis Ben Miloud--Josselin Date: Tue, 19 Jan 2021 11:37:52 +0100 Subject: [PATCH] [kvmstats] Replace old kvmstats script if it exists --- kvmstats/deploy-kvmstats.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/kvmstats/deploy-kvmstats.yml b/kvmstats/deploy-kvmstats.yml index 3dd5fab..ba8bd98 100644 --- a/kvmstats/deploy-kvmstats.yml +++ b/kvmstats/deploy-kvmstats.yml @@ -29,6 +29,17 @@ dest: /var/www/index.html insertbefore: '' line: '
  • kvmstats
  • ' + - 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: