# vim: set filetype=yaml.ansible : # ## Package: restic ## Description: backup with builtin encryption and compression ## Version: system ## Methods: system ## Helpers: - --- - name: Set restic default facts # {{{ ansible.builtin.set_fact: restic: methods: default: [system] pkgname: default: restic - name: Finalise restic default facts ansible.builtin.set_fact: restic: methods: "{{ restic.methods[os_family] | default(restic.methods.default) }}" pkgname: "{{ restic.pkgname[os_family] | default(restic.pkgname.default) }}" # }}} - name: Configure restic when: - "'restic' not in __configured" block: - name: Set restic install method when: - restic_imethod is undefined ansible.builtin.set_fact: restic_imethod: "{{ imethod if imethod in restic.methods else restic.methods[0] }}" - name: Configure restic system install when: - restic_imethod == 'system' block: - name: Queue restic system install ansible.builtin.set_fact: pkg_sys: "{{ pkg_sys + [restic.pkgname] }}" restic_install: "{{ restic_imethod }}={{ restic.pkgname }}" - name: Finalise restic configuration ansible.builtin.set_fact: __configured: "{{ __configured | combine( { 'restic': restic_install } ) }}"