diff --git a/roles/tmux/tasks/main.yml b/roles/tmux/tasks/main.yml index 805bbc4..5fbb53a 100644 --- a/roles/tmux/tasks/main.yml +++ b/roles/tmux/tasks/main.yml @@ -20,7 +20,7 @@ - item.value[5] in ['/bin/bash', '/bin/zsh', '/usr/bin/bash', '/usr/bin/zsh', '/usr/bin/fish'] - item.value[0] != 'root' - item.value[4] is defined - - item.value[4] | length > 1 + - item.value[4] != '/' - name: Display the list of collected home directories ansible.builtin.debug: diff --git a/roles/tmux/tasks/tmux_config.yml b/roles/tmux/tasks/tmux_config.yml index 7d6c4dd..3759ebd 100644 --- a/roles/tmux/tasks/tmux_config.yml +++ b/roles/tmux/tasks/tmux_config.yml @@ -21,6 +21,7 @@ loop: "{{ tmux_plugins }}" loop_control: loop_var: plugin_item + when: home_dir != '/' - name: "Add git safe.directories" ansible.builtin.command: "git config --global --add safe.directory {{ home_dir }}/.config/tmux/{{ plugin_item.path }}" @@ -28,6 +29,7 @@ loop: "{{ tmux_plugins }}" loop_control: loop_var: plugin_item + when: home_dir != '/' - name: "Clone plugins" ansible.builtin.git: @@ -37,6 +39,7 @@ loop: "{{ tmux_plugins }}" loop_control: loop_var: plugin_item + when: home_dir != '/' - name: "Set plugin ownership" ansible.builtin.file: @@ -48,10 +51,12 @@ loop: "{{ tmux_plugins }}" loop_control: loop_var: plugin_item + when: home_dir != '/' - name: Set catppuccin_install_path for template ansible.builtin.set_fact: catppuccin_install_path: "{{ home_dir }}/.config/tmux/{{ (tmux_plugins | selectattr('name', 'equalto', 'catppuccin') | first).path }}" + when: home_dir != '/' - name: Install Template ansible.builtin.template: @@ -60,4 +65,5 @@ owner: "{{ config_owner }}" group: "{{ config_owner }}" mode: '0644' + when: home_dir != '/'