diff --git a/installer/install/tpot.yml b/installer/install/tpot.yml index 01954f9d..e3cbc118 100644 --- a/installer/install/tpot.yml +++ b/installer/install/tpot.yml @@ -129,7 +129,6 @@ - cracklib-runtime - cron - curl - - exa - git - gnupg - grc @@ -146,6 +145,32 @@ - "Raspbian" - "Ubuntu" + - name: Install exa (Debian, Raspbian, Ubuntu) + package: + name: + - exa + state: latest + update_cache: yes + register: exa_install_result + ignore_errors: yes + when: ansible_distribution in ["Debian", "Raspbian", "Ubuntu"] + tags: + - "Debian" + - "Raspbian" + - "Ubuntu" + + - name: Install eza (if exa failed) + package: + name: + - eza + state: latest + update_cache: yes + when: exa_install_result is failed + tags: + - "Debian" + - "Raspbian" + - "Ubuntu" + - name: Install grc from remote repo (AlmaLinux, Rocky) ansible.builtin.dnf: name: 'https://github.com/kriipke/grc/releases/download/1.13.8/grc-1.13.8-1.el7.noarch.rpm' @@ -674,7 +699,7 @@ when: ansible_distribution in ["AlmaLinux", "Debian", "Fedora", "openSUSE Tumbleweed", "Raspbian", "Rocky", "Ubuntu"] failed_when: ansible_user_id == "root" - - name: Add aliases (All) + - name: Add aliases with exa (All) blockinfile: path: ~/.bashrc block: | @@ -688,7 +713,35 @@ marker: "# {mark} ANSIBLE MANAGED BLOCK" insertafter: EOF state: present - when: ansible_distribution in ["AlmaLinux", "Debian", "Fedora", "openSUSE Tumbleweed", "Raspbian", "Rocky", "Ubuntu"] + when: exa_install_result is succeeded and ansible_distribution in ["AlmaLinux", "Debian", "Fedora", "openSUSE Tumbleweed", "Raspbian", "Rocky", "Ubuntu"] + tags: + - "AlmaLinux" + - "Debian" + - "Fedora" + - "openSUSE Tumbleweed" + - "Raspbian" + - "Rocky" + - "Ubuntu" + + - name: Add aliases with eza (Debian, Raspbian, Ubuntu) + blockinfile: + path: ~/.bashrc + block: | + alias dps='grc --colour=on docker ps -f status=running -f status=exited --format "table {{'{{'}}.Names{{'}}'}}\\t{{'{{'}}.Status{{'}}'}}\\t{{'{{'}}.Ports{{'}}'}}" | sort' + alias dpsw='watch -c bash -ic dps' + alias mi='micro' + alias sudo='sudo ' + alias ls='eza' + alias ll='eza -hlg' + alias la='eza -hlag' + marker: "# {mark} ANSIBLE MANAGED BLOCK" + insertafter: EOF + state: present + when: exa_install_result is failed and ansible_distribution in ["Debian", "Raspbian", "Ubuntu"] + tags: + - "Debian" + - "Raspbian" + - "Ubuntu" - name: Clone / Update T-Pot repository (All) git: