Compare commits
	
		
			2 Commits
		
	
	
		
			1.0.7
			...
			5edb3c08a2
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 5edb3c08a2 | |||
| 54d2327ec8 | 
| @@ -44,6 +44,7 @@ packages_linux_paru_archlinux: | |||||||
|   - 'flent' |   - 'flent' | ||||||
|   - 'mmv' |   - 'mmv' | ||||||
|   - 'paccache-hook' |   - 'paccache-hook' | ||||||
|  |   - 'tmux-resurrect' | ||||||
|  |  | ||||||
| packages_linux_common_debian: | packages_linux_common_debian: | ||||||
|   - 'apt-file' |   - 'apt-file' | ||||||
|   | |||||||
| @@ -31,7 +31,7 @@ | |||||||
|     path: '{{ pkg.global_config_file }}' |     path: '{{ pkg.global_config_file }}' | ||||||
|  |  | ||||||
| - name: 'Remove per-package config' | - name: 'Remove per-package config' | ||||||
|   when: 'stat_result.pkg.name not in ansible_facts.packages' |   when: 'stat_result.pkg.name not in ansible_facts.packages and stat_result.stat.exists' | ||||||
|   loop_control: |   loop_control: | ||||||
|     loop_var: 'stat_result' |     loop_var: 'stat_result' | ||||||
|     label: 'If ''{{ stat_result.pkg.name }}'' package is absent and system-wide config file ''{{ stat_result.pkg.global_config_file }}'' is present remove config file' |     label: 'If ''{{ stat_result.pkg.name }}'' package is absent and system-wide config file ''{{ stat_result.pkg.global_config_file }}'' is present remove config file' | ||||||
|   | |||||||
| @@ -10,19 +10,19 @@ | |||||||
|     create: true |     create: true | ||||||
|     block: '{{ tmux_global_config_resurrect }}' |     block: '{{ tmux_global_config_resurrect }}' | ||||||
|  |  | ||||||
| - name: 'If Arch Linux and ''tmux-resurrect'' package is absent never auto-load tmux-resurrect on tmux start system-wide' | - name: 'Get stats of ''{{ tmux_global_config_file }}''' | ||||||
|   when: '(ansible_facts[''os_family''] | lower == ''archlinux'') and (''tmux-resurrect'' not in ansible_facts.packages)' |   ansible.builtin.stat: | ||||||
|  |     path: '{{ tmux_global_config_file }}' | ||||||
|  |   register: 'role_common_packages__tmux_global_config_file_stats' | ||||||
|  |  | ||||||
|  | - name: 'If Arch Linux and ''tmux-resurrect'' package is absent and system-wide config file ''{{ tmux_global_config_file }}'' is present remove config block from file' | ||||||
|  |   when: '(ansible_facts[''os_family''] | lower == ''archlinux'') and (''tmux-resurrect'' not in ansible_facts.packages) and (role_common_packages__tmux_global_config_file_stats.stat.exists)' | ||||||
|   ansible.builtin.blockinfile: |   ansible.builtin.blockinfile: | ||||||
|     marker: '# {mark} ANSIBLE MANAGED BLOCK - tmux-resurrect' |     marker: '# {mark} ANSIBLE MANAGED BLOCK - tmux-resurrect' | ||||||
|     path: '{{ tmux_global_config_file }}' |     path: '{{ tmux_global_config_file }}' | ||||||
|     state: 'absent' |     state: 'absent' | ||||||
|     block: '{{ tmux_global_config_resurrect }}' |     block: '{{ tmux_global_config_resurrect }}' | ||||||
|  |  | ||||||
| - name: 'Get stats of ''{{ tmux_global_config_file }}''' |  | ||||||
|   ansible.builtin.stat: |  | ||||||
|     path: '{{ tmux_global_config_file }}' |  | ||||||
|   register: 'role_common_packages__tmux_global_config_file_stats' |  | ||||||
|  |  | ||||||
| - name: 'If ''{{ tmux_global_config_file }}'' is 0 bytes delete it' | - name: 'If ''{{ tmux_global_config_file }}'' 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.size == 0' | ||||||
|   ansible.builtin.file: |   ansible.builtin.file: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user