From 6c5da0c1598f345885fce31822082e41ac0b3caa Mon Sep 17 00:00:00 2001 From: L3D Date: Wed, 31 Jul 2024 15:36:53 +0200 Subject: [PATCH] Backup Config files before overwriting them --- tasks/config.yml | 2 ++ tasks/dynamic_names.yml | 1 + tasks/waybar.yml | 3 +++ vars/main.yml | 2 +- 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/tasks/config.yml b/tasks/config.yml index cc4f748..ff5d20c 100644 --- a/tasks/config.yml +++ b/tasks/config.yml @@ -55,6 +55,7 @@ mode: '0640' owner: "{{ swayusr.user }}" group: "{{ swayusr.user }}" + backup: true loop: "{{ sway__user_list | flatten(1) }}" loop_control: label: "{{ swayusr.home }}/.swaylock/config" @@ -68,6 +69,7 @@ mode: '0640' owner: "{{ swayusr.user }}" group: "{{ swayusr.user }}" + backup: true loop: "{{ sway__user_list | flatten(1) }}" loop_control: label: "{{ swayusr.home }}/.config/sway/config" diff --git a/tasks/dynamic_names.yml b/tasks/dynamic_names.yml index 8c7e949..d4262e0 100644 --- a/tasks/dynamic_names.yml +++ b/tasks/dynamic_names.yml @@ -23,3 +23,4 @@ mode: '0640' owner: "{{ swayusr.user }}" group: "{{ swayusr.user }}" + backup: true diff --git a/tasks/waybar.yml b/tasks/waybar.yml index c7628ff..64fa76c 100644 --- a/tasks/waybar.yml +++ b/tasks/waybar.yml @@ -25,6 +25,7 @@ mode: '0750' owner: "{{ swayusr.user }}" group: "{{ swayusr.user }}" + backup: true - name: Deploy waybar stylesheet become: true @@ -34,6 +35,7 @@ mode: '0640' owner: "{{ swayusr.user }}" group: "{{ swayusr.user }}" + backup: true - name: Deploy waybar config become: true @@ -43,3 +45,4 @@ mode: '0640' owner: "{{ swayusr.user }}" group: "{{ swayusr.user }}" + backup: true diff --git a/vars/main.yml b/vars/main.yml index 695bc48..df72282 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -1,3 +1,3 @@ --- -playbook_version_number: 10 # should be int +playbook_version_number: 11 # should be int playbook_version_path: 'role-roles-ansible.sway.version'