Start a base role that currently adds alacritty termcap to FreeBSD.

This commit is contained in:
Tom Alexander
2022-10-11 22:53:10 -04:00
parent 8e5e91bbce
commit 8ab8000d0c
10 changed files with 91 additions and 1 deletions

View File

@@ -0,0 +1,21 @@
- name: See if the alacritty termcap has been added
lineinfile:
name: /usr/share/misc/termcap
regexp: |-
^alacritty\|
state: absent
check_mode: yes
changed_when: false
register: alacritty_cap
- name: Append alacritty termcap info
blockinfile:
path: /usr/share/misc/termcap
block: "{{ lookup('file', 'alacritty.termcap') }}"
marker: "# {mark} ANSIBLE MANAGED BLOCK alacritty"
when: not alacritty_cap.found
register: wrote_alacritty_cap
- name: Update cap_mkdb
command: cap_mkdb /usr/share/misc/termcap
when: wrote_alacritty_cap.changed