fix(role): Delete tmux global config only if it exists

Do a aanity check if tmux global config exists.
This commit is contained in:
2025-08-25 00:06:15 +02:00
parent 5edb3c08a2
commit c57840bb11

View File

@@ -23,8 +23,8 @@
state: 'absent' state: 'absent'
block: '{{ tmux_global_config_resurrect }}' block: '{{ tmux_global_config_resurrect }}'
- name: 'If ''{{ tmux_global_config_file }}'' is 0 bytes delete it' - name: 'If ''{{ tmux_global_config_file }}'' exists and is 0 bytes delete it'
when: 'role_common_packages__tmux_global_config_file_stats.stat.size == 0' 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: ansible.builtin.file:
path: '{{ tmux_global_config_file }}' path: '{{ tmux_global_config_file }}'
state: 'absent' state: 'absent'