# 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 }}/bin/uwsm" - 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