From 128c0a08e71eb4190bc65a95f13ff9ed65c4b61e Mon Sep 17 00:00:00 2001 From: "Antonio J. Delgado" Date: Mon, 27 Mar 2023 11:51:47 +0300 Subject: [PATCH] add backup of previous index --- tasks/configure_custom_theme.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tasks/configure_custom_theme.yml b/tasks/configure_custom_theme.yml index 94de306..68b58ce 100644 --- a/tasks/configure_custom_theme.yml +++ b/tasks/configure_custom_theme.yml @@ -34,6 +34,13 @@ path: /usr/src/nagio4_theme/index.php register: index_php +- name: Backup previous index.php + copy: + remote_src: true + src: /usr/share/nagios4/htdocs/index.php + dest: /usr/share/nagios4/htdocs/index_previous.php + when: index_php.stat.exists + - name: Copy custom index.php copy: remote_src: true