Files
ansible_role_package/tasks/src/uwsm.yml
Matthew Stobbs 084d57a3b5 force git clones
2025-03-31 19:08:36 -06:00

54 lines
1.3 KiB
YAML

# vim: set filetype=yaml.ansible :
---
- name: Remove existing install {{ pkg }}
when:
- uwsm.clean
become: true
loop: "{{ uwsm.installed_files }}"
loop_control:
loop_var: file
ansible.builtin.file:
state: absent
path: "{{ file }}"
- name: Check for installed {{ pkg }}
register: stat_uwsm_inst
ansible.builtin.stat:
path: "{{ uwsm.prefix }}"
- name: Build and install {{ uwsm }}
when:
- not stat_uwsm_inst.stat.exists
block:
- name: Clone git repository {{ pkg }}
ansible.builtin.git:
force: true
depth: 1
dest: "{{ d_tempdir.path }}/uwsm"
repo: "{{ uwsm.repo }}"
version: "v{{ uwsm.vers }}"
- name: Build {{ pkg }}
ansible.builtin.command:
creates: "{{ d_tempdir.path }}/uwsm/build"
chdir: "{{ d_tempdir.path }}/uwsm"
argv:
- meson
- setup
- --prefix={{ uwsm.prefix }}
- -Duuctl=enabled
- -Dfumon=enabled
- -Duwsm-app=enabled
- build
- name: Install {{ pkg }}
become: true
ansible.builtin.command:
creates: "{{ uwsm.prefix }}/bin/uwsm"
chdir: "{{ d_tempdir.path }}/uwsm"
argv:
- meson
- install
- -C
- build