# vim: set filetype=yaml.ansible : # ## Package: stow ## Description: GNU symbolic link manager ## Version: latest ## Methods: [system, source] ## Helpers: make --- - name: Set stow default facts # {{{ ansible.builtin.set_fact: stow: methods: Archlinux: [system, source] default: [source] pkgname: default: stow - name: Finalise stow default facts ansible.builtin.set_fact: stow: methods: "{{ stow.methods[os_family] | default(stow.methods.default) }}" pkgname: "{{ stow.pkgname[os_family] | default(stow.pkgname.default) }}" baseurl: https://ftp.gnu.org/gnu/stow version: 2.4.1 # }}} - name: Configure stow when: - "'stow' not in __configured" block: - name: Set stow install method when: - stow_imethod is undefined ansible.builtin.set_fact: stow_imethod: "{{ imethod if imethod in stow.methods else stow.methods[0] }}" - name: Configure stow system install when: - stow_imethod == 'system' block: - name: Queue stow for system install ansible.builtin.set_fact: pkg_sys: "{{ pkg_sys + [stow.pkgname] }}" stow_install: "{{ stow_imethod }}={{ stow.pkgname }}" - name: Configure stow source install when: - stow_imethod == 'source' block: - name: Set stow source install configuration ansible.builtin.set_fact: stow_src_install: url: "{{ stow.baseurl }}/stow-{{ stow.version }}.tar.gz" name: "stow-{{ stow.version }}.tar.gz" extract_to: "{{ d_cache.path }}" path: "{{ d_cache.path }}/stow-{{ stow.version }}" target: configure: options: "--prefix={{ install_prefix }}" build: name: "" install: name: install - name: Queue stow source install ansible.builtin.set_fact: pkg_make: "{{ pkg_make + [stow_src_install] }}" stow_install: "{{ stow_imethod }}={{ stow_src_install }}" - name: Finalise stow configuration ansible.builtin.set_fact: __configured: "{{ __configured | combine( { 'stow': stow_install } ) }}"