# vim: set filetype=yaml.ansible : --- - name: Extract archive to given path block: - name: Ensure directory exists become: "{{ install_become }}" become_user: "{{ install_become_user }}" ansible.bulitin.file: state: directory path: "{{ pkg.extract_path }}" mode: "{{ pkg.install_prefix_mode | default('0755') }}" owner: "{{ pkg.install_prefix_owner | default(ansible_user_id)}}" group: "{{ pkg.install_prefix_group | default(ansible_user_gid) }}" - name: Download archive to cache ansible.builtin.get_url: dest: "{{ d_cache }}/{{ pkg.archive_name }}" url: "{{ pkg.archive_url }}" checksum: "{{ pkg.archive_checksum | default(omit) }}" decompress: false mode: '0644' - name: Extract archive ansible.builtin.unarchive: dest: "{{ pkg.extract_path }}" src: "{{ d_cache }}/{{ pkg.archive_name }}" remote_src: true include: "{{ pkg.archive_include | default(omit) }}" exclude: "{{ pkg.archive_exclude | default(omit) }}" - name: Symlink archive files when: - pkg.link_bin is defined - pkg.link_bin | length > 0 loop: pkg.link_bin loop_control: loop_var: lnk ansible.builtin.file: state: link path: "{{ lnk.to }}" src: "{{ lnk.from }}" force: "{{ lnk.force | default(omit) }}"