38 lines
1.0 KiB
YAML
38 lines
1.0 KiB
YAML
# vim: set filetype=yaml.ansible :
|
|
---
|
|
- name: Clean existing install
|
|
when:
|
|
- ghostty.clean
|
|
become: "{{ ext_become }}"
|
|
loop: "{{ ghostty.installed_files }}"
|
|
loop_control:
|
|
loop_var: file
|
|
ansible.builtin.file:
|
|
state: absent
|
|
path: "{{ path.prefix }}/{{ file }}"
|
|
|
|
- name: Check if ghostty is installed
|
|
register: stat_ghostty_inst
|
|
ansible.builtin.stat:
|
|
path: "{{ path.prefix }}/bin/ghostty"
|
|
|
|
- name: Install and build source for {{ pkg }}
|
|
when:
|
|
- not stat_ghostty_inst.stat.exists
|
|
block:
|
|
- name: Clone git repository {{ pkg }}
|
|
ansible.builtin.git:
|
|
depth: 1
|
|
force: true
|
|
dest: "{{ d_tempdir.path }}/ghostty"
|
|
repo: "{{ ghostty.repo }}"
|
|
version: "{{ ghostty.vers }}"
|
|
|
|
- name: Build {{ pkg }}
|
|
become: "{{ ext_become }}"
|
|
register: c_ghostty_build
|
|
ansible.builtin.command:
|
|
chdir: "{{ d_tempdir.path }}/ghostty"
|
|
creates: "{{ path.prefix }}/bin/ghostty"
|
|
cmd: "zig build -p {{ path.prefix }} -Doptimize={{ ghostty.optimize }}"
|