2017-02-07 16:28:35 +01:00
|
|
|
---
|
2023-08-23 20:18:27 +02:00
|
|
|
- name: Check tarsnap apt signing key
|
|
|
|
ansible.builtin.stat:
|
|
|
|
path: /etc/apt/keyrings/tarsnap-deb-packaging-key.asc
|
|
|
|
register: tarsnap_signing_key_stat
|
|
|
|
|
|
|
|
- name: Download tarsnap apt signing key
|
|
|
|
ansible.builtin.get_url:
|
|
|
|
url: https://pkg.tarsnap.com/tarsnap-deb-packaging-key.asc
|
|
|
|
dest: /etc/apt/keyrings/tarsnap-deb-packaging-key.asc
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0644
|
|
|
|
register: download_tarsnap_signing_key
|
|
|
|
when: not tarsnap_signing_key_stat.stat.exists
|
|
|
|
|
|
|
|
- name: Add tarsnap.org repo
|
|
|
|
ansible.builtin.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'
|
|
|
|
|
2019-03-17 16:29:15 +01:00
|
|
|
- name: Update apt cache
|
2023-08-23 20:18:27 +02:00
|
|
|
ansible.builtin.apt: # noqa no-handler
|
2022-09-10 21:33:19 +02:00
|
|
|
update_cache: true
|
2019-03-17 16:29:15 +01:00
|
|
|
when:
|
2023-08-23 20:18:27 +02:00
|
|
|
(download_tarsnap_signing_key.status_code is defined and download_tarsnap_signing_key.status_code == 200) or
|
2019-03-17 16:29:15 +01:00
|
|
|
add_tarsnap_apt_repository is changed
|
|
|
|
|
2017-02-07 16:28:35 +01:00
|
|
|
- name: Install tarsnap
|
2023-08-23 20:20:22 +02:00
|
|
|
ansible.builtin.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
|
2023-08-23 20:20:22 +02:00
|
|
|
ansible.builtin.copy:
|
|
|
|
src: tarsnaprc
|
|
|
|
dest: /root/.tarsnaprc
|
|
|
|
owner: root
|
|
|
|
group: root
|
|
|
|
mode: 0600
|
2018-05-20 11:51:02 +02:00
|
|
|
|
2017-02-07 16:28:35 +01:00
|
|
|
# vim: set sw=2 ts=2:
|