From c57840bb1164f9550713a5f47d5f18c73f851a7b Mon Sep 17 00:00:00 2001 From: hygienic-books Date: Mon, 25 Aug 2025 00:06:15 +0200 Subject: [PATCH] fix(role): Delete tmux global config only if it exists Do a aanity check if tmux global config exists. --- tasks/base-package-auxiliary-settings-tmux.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/base-package-auxiliary-settings-tmux.yml b/tasks/base-package-auxiliary-settings-tmux.yml index 7e25467..b69ad71 100644 --- a/tasks/base-package-auxiliary-settings-tmux.yml +++ b/tasks/base-package-auxiliary-settings-tmux.yml @@ -23,8 +23,8 @@ state: 'absent' block: '{{ tmux_global_config_resurrect }}' -- name: 'If ''{{ tmux_global_config_file }}'' is 0 bytes delete it' - when: 'role_common_packages__tmux_global_config_file_stats.stat.size == 0' +- name: 'If ''{{ tmux_global_config_file }}'' exists and is 0 bytes delete it' + when: '(role_common_packages__tmux_global_config_file_stats.stat.exists) and (role_common_packages__tmux_global_config_file_stats.stat.size == 0)' ansible.builtin.file: path: '{{ tmux_global_config_file }}' state: 'absent'