- name: Install dependencies for Tarsnap apt: pkg=$item state=installed with_items: - libssl-dev - zlib1g-dev - e2fslibs-dev - name: Download Tarsnap source get_url: url=https://www.tarsnap.com/download/tarsnap-autoconf-${tarsnap_version}.tgz dest=/root/tarsnap-autoconf-${tarsnap_version}.tgz #sha256sum=14c0172afac47f5f7cbc58e6442a27a0755685711f9d1cec4195c4f457053811 - name: Decompress Tarsnap source command: tar xzf /root/tarsnap-autoconf-${tarsnap_version}.tgz chdir=/root creates=/root/tarsnap-autoconf-${tarsnap_version}/COPYING - name: Configure Tarsnap for local build command: ./configure chdir=/root/tarsnap-autoconf-${tarsnap_version} creates=/root/tarsnap-autoconf-${tarsnap_version}/Makefile - name: Build and install Tarsnap command: make all install clean chdir=/root/tarsnap-autoconf-${tarsnap_version} creates=/usr/local/bin/tarsnap - name: Copy Tarsnap key file into place copy: src=root_tarsnap.key dest=/root/tarsnap.key owner=root group=root - name: Create Tarsnap cache directory file: state=directory path=/usr/tarsnap-cache - name: Install Tarsnap configuration file copy: src=tarsnaprc dest=/root/.tarsnaprc mode="644" - name: Install Tarsnap backup handler script copy: src=tarsnap.sh dest=/root/tarsnap.sh mode="755" - name: Install nightly Tarsnap-generations cronjob cron: name="Tarsnap backup" hour="23" minute="0" job="sh /root/tarsnap.sh >> /var/log/tarsnap.log"