Nessuna descrizione
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

tarsnap.yml 1.4KB

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