Cleanup: only look at terminfo file (not executable)

This commit is contained in:
Sven Velt 2024-01-04 12:36:26 +01:00
parent b2f5558fa3
commit 301569e4d4

View file

@ -1,22 +1,22 @@
--- ---
- name: Look for already installed kitty - name: Look for already installed kitty terminfo file
shell: "which kitty" stat:
register: kitty_installed path: /usr/share/terminfo/x/xterm-kitty
changed_when: False register: kitty_terminfo_file
failed_when: False
- name: 'Try to install "kitty-terminfo"' - name: 'Try to install "kitty-terminfo"'
package: package:
name: kitty-terminfo name: kitty-terminfo
state: latest state: latest
update_cache: yes
ignore_errors: yes ignore_errors: yes
register: kitty_terminfo_installed register: kitty_terminfo_installed
when: kitty_installed.rc == 1 when: kitty_terminfo_file.stat.exists == False
- name: "If no kitty(-terminfo) available, install manually" - name: "If no kitty(-terminfo) available, install manually"
include_tasks: manual.yml include_tasks: manual.yml
when: kitty_installed is failed and kitty_terminfo_installed is defined and kitty_terminfo_installed is failed when: kitty_terminfo_file.stat.exists == False and kitty_terminfo_installed is defined and kitty_terminfo_installed is failed