2017-02-07 16:28:35 +01:00
|
|
|
---
|
|
|
|
- name: Add Tarsnap apt mirror
|
|
|
|
template: src=tarsnap_sources.list.j2 dest=/etc/apt/sources.list.d/tarsnap.list owner=root group=root mode=0644
|
2019-03-17 16:29:15 +01:00
|
|
|
register: add_tarsnap_apt_repository
|
2017-02-07 16:28:35 +01:00
|
|
|
when: ansible_architecture != 'armv7l'
|
|
|
|
|
|
|
|
- name: Add GPG key for Tarsnap
|
2019-07-07 14:49:45 +02:00
|
|
|
apt_key: id=0x6D97F5A4CA38CF33 url=https://pkg.tarsnap.com/tarsnap-deb-packaging-key.asc state=present
|
2019-07-19 11:07:27 +02:00
|
|
|
when: ansible_distribution_release != 'buster'
|
|
|
|
register: add_tarsnap_apt_key
|
|
|
|
|
|
|
|
# Tarsnap currently provides experimental packages for Debian 10 "buster"
|
|
|
|
# See: https://www.tarsnap.com/pkg-deb.html#experimental
|
|
|
|
- name: Add GPG key for Tarsnap experimental
|
|
|
|
apt_key: id=0xF77F1024ECFAF293 url=https://pkg.tarsnap.com/experimental/tarsnap-EXPERIMENTAL-deb-packaging-key.asc state=present
|
|
|
|
when: ansible_distribution == 'Debian' and ansible_distribution_release == 'buster'
|
2019-03-17 16:29:15 +01:00
|
|
|
register: add_tarsnap_apt_key
|
2017-02-07 16:28:35 +01:00
|
|
|
|
2019-03-17 16:29:15 +01:00
|
|
|
- name: Update apt cache
|
|
|
|
apt:
|
|
|
|
update_cache: yes
|
|
|
|
when:
|
|
|
|
add_tarsnap_apt_key is changed or
|
|
|
|
add_tarsnap_apt_repository is changed
|
|
|
|
|
2017-02-07 16:28:35 +01:00
|
|
|
- name: Install tarsnap
|
2019-03-17 16:29:28 +01:00
|
|
|
apt: pkg=tarsnap cache_valid_time=3600
|
2017-02-07 16:28:35 +01:00
|
|
|
|
2018-05-20 11:51:02 +02:00
|
|
|
- name: Copy tarsnaprc
|
|
|
|
copy: src=tarsnaprc dest=/root/.tarsnaprc owner=root group=root mode=0600
|
|
|
|
|
2017-02-07 16:28:35 +01:00
|
|
|
# vim: set sw=2 ts=2:
|