feat(test): Using vagrant for test
Signed-off-by: Tuan-Dat Tran <tuan-dat.tran@tudattr.dev>
This commit is contained in:
28
roles/setup/tasks/ghostty.yml
Normal file
28
roles/setup/tasks/ghostty.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
- name: Get OS release info
|
||||
shell: source /etc/os-release && echo $VERSION_ID
|
||||
register: version_id
|
||||
changed_when: false
|
||||
|
||||
- name: Get Ghostty DEB URL
|
||||
shell: |
|
||||
curl -s https://api.github.com/repos/mkasberg/ghostty-ubuntu/releases/latest |
|
||||
grep -oP "https://github.com/mkasberg/ghostty-ubuntu/releases/download/[^\s/]+/ghostty_[^\s/_]+_amd64_{{ version_id.stdout }}.deb"
|
||||
register: ghostty_deb_url
|
||||
changed_when: false
|
||||
|
||||
- name: Download Ghostty deb file
|
||||
get_url:
|
||||
url: "{{ ghostty_deb_url.stdout }}"
|
||||
dest: "/tmp/{{ ghostty_deb_url.stdout | basename }}"
|
||||
mode: "0755"
|
||||
|
||||
- name: Install Ghostty
|
||||
apt:
|
||||
deb: "/tmp/{{ ghostty_deb_url.stdout | basename }}"
|
||||
state: present
|
||||
|
||||
- name: Remove Ghostty deb file
|
||||
file:
|
||||
path: "/tmp/{{ ghostty_deb_url.stdout | basename }}"
|
||||
state: absent
|
||||
Reference in New Issue
Block a user