- name: Remove existing install when: - hyprland_clean become: "{{ ext_become }}" loop: hyprwayland_scanner.installed_files loop_control: loop_var: file ansible.builtin.file: state: absent path: "{{ path.prefix }}/{{ file }}" - name: Build and install hyprwayland-scanner block: - name: Clone git repository ansible.builtin.git: depth: 1 dest: "{{ d_tempdir.path }}/hyprwayland-scanner" repo: "{{ hyprwayland_scanner.repo }}" version: "{{ hyprwayland_scanner.vers }}" - name: Configure hyprwayland-scanner ansible.builtin.command: creates: "{{ d_tempdir.path }}/hyprwayland-scanner/build" chdir: "{{ d_tempdir.path }}/hyprwayland-scanner" argv: - cmake - -DCMAKE_INSTALL_PREFIX={{ path.prefix }} - -B - build - name: Build hyprwayland-scanner ansible.builtin.command: creates: "{{ d_tempdir.path }}/hyprwayland-scanner/build/hyprwayland-scanner" chdir: "{{ d_tempdir.path }}/hyprwayland-scanner" argv: - cmake - --build - build - -j - "{{ ansible_processor_nproc|int }}" - name: Install hyprwayland-scanner become: "{{ ext_become }}" ansible.builtin.command: creates: "{{ path.bin }}/hyprwayland-scanner" chdir: "{{ d_tempdir.path }}/hyprwayland-scanner" argv: - cmake - --install - build