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
shell: "which kitty"
register: kitty_installed
changed_when: False
failed_when: False
- name: Look for already installed kitty terminfo file
stat:
path: /usr/share/terminfo/x/xterm-kitty
register: kitty_terminfo_file
- name: 'Try to install "kitty-terminfo"'
package:
name: kitty-terminfo
state: latest
update_cache: yes
ignore_errors: yes
register: kitty_terminfo_installed
when: kitty_installed.rc == 1
when: kitty_terminfo_file.stat.exists == False
- name: "If no kitty(-terminfo) available, install manually"
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