Initial commit
Download kitty terminfo file, if no kitty is installed
This commit is contained in:
commit
7c2a9ff252
55
tasks/main.yml
Normal file
55
tasks/main.yml
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
---
|
||||||
|
- name: Create tempdir
|
||||||
|
tempfile:
|
||||||
|
state: directory
|
||||||
|
register: kitty_tempdir
|
||||||
|
delegate_to: localhost
|
||||||
|
run_once: True
|
||||||
|
|
||||||
|
|
||||||
|
- name: Download actuel kitty terminfo
|
||||||
|
get_url:
|
||||||
|
url: "https://github.com/kovidgoyal/kitty/blob/master/terminfo/x/xterm-kitty?raw=true"
|
||||||
|
dest: "{{ kitty_tempdir.path }}/xterm-kitty"
|
||||||
|
delegate_to: localhost
|
||||||
|
run_once: True
|
||||||
|
|
||||||
|
|
||||||
|
- name: Look for already installed kitty
|
||||||
|
shell: "which kitty"
|
||||||
|
register: kitty_installed
|
||||||
|
ignore_errors: True
|
||||||
|
changed_when: False
|
||||||
|
|
||||||
|
|
||||||
|
- name: "(Block) Install terminfo dir and file"
|
||||||
|
block:
|
||||||
|
|
||||||
|
- name: Create terminfo dir
|
||||||
|
file:
|
||||||
|
path: /usr/share/terminfo/x/
|
||||||
|
state: directory
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: "0755"
|
||||||
|
force: False
|
||||||
|
|
||||||
|
- name: Copy terminfo
|
||||||
|
copy:
|
||||||
|
src: "{{ kitty_tempdir.path }}/xterm-kitty"
|
||||||
|
dest: "/usr/share/terminfo/x/xterm-kitty"
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0644
|
||||||
|
|
||||||
|
when: kitty_installed is failed
|
||||||
|
|
||||||
|
|
||||||
|
- name: Delete tempdir
|
||||||
|
file:
|
||||||
|
path: "{{ kitty_tempdir.path }}"
|
||||||
|
state: absent
|
||||||
|
delegate_to: localhost
|
||||||
|
run_once: True
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue