Files
fedora-provisioning-ansible/tasks/ghostty.yml
T
2026-08-12 21:24:43 +01:00

49 lines
1.3 KiB
YAML

---
- name: Stat Ghostty installation
ansible.builtin.stat:
path: /opt/ghostty/Ghostty.AppImage
register: ghostty_installed_result
- name: Create Ghostty install directory
ansible.builtin.file:
path: /opt/ghostty
state: directory
owner: root
group: root
mode: "0755"
when: not ghostty_installed_result.stat.exists
- name: Download Ghostty AppImage
ansible.builtin.get_url:
url: "https://github.com/pkgforge-dev/ghostty-appimage/releases/download/v{{ ghostty_version }}/Ghostty-{{ ghostty_version }}-{{ ghostty_arch }}.AppImage"
dest: /opt/ghostty/Ghostty.AppImage
mode: "0755"
timeout: 300
when: not ghostty_installed_result.stat.exists
- name: Link Ghostty onto system PATH
ansible.builtin.file:
src: /opt/ghostty/Ghostty.AppImage
dest: /usr/local/bin/ghostty
state: link
force: true
- name: Ensure system desktop application directory exists
ansible.builtin.file:
path: /usr/local/share/applications
state: directory
mode: "0755"
- name: Create Ghostty desktop launcher
ansible.builtin.copy:
dest: /usr/local/share/applications/ghostty.desktop
mode: "0644"
content: |
[Desktop Entry]
Type=Application
Name=Ghostty
Comment=Ghostty terminal emulator
Exec=/usr/local/bin/ghostty
Terminal=false
Categories=System;TerminalEmulator;