2024-10-08 20:01:54 +00:00
|
|
|
- name: Install aptitude
|
2024-10-14 16:30:24 +00:00
|
|
|
ansible.builtin.apt:
|
2024-10-08 20:01:54 +00:00
|
|
|
name: aptitude
|
2024-10-14 16:30:24 +00:00
|
|
|
state: present
|
2024-10-08 20:01:54 +00:00
|
|
|
update_cache: true
|
|
|
|
become: true
|
|
|
|
|
|
|
|
- name: Install docker
|
|
|
|
ansible.builtin.import_tasks: docker.yml
|
|
|
|
|
2024-10-14 01:30:59 +00:00
|
|
|
- name: Install jq and bzip2
|
2024-10-14 16:30:24 +00:00
|
|
|
ansible.builtin.apt:
|
2024-10-08 20:01:54 +00:00
|
|
|
pkg:
|
|
|
|
- jq
|
2024-10-14 01:30:59 +00:00
|
|
|
- bzip2
|
2024-10-14 16:30:24 +00:00
|
|
|
state: present
|
2024-10-08 20:01:54 +00:00
|
|
|
update_cache: true
|
|
|
|
become: true
|
2024-10-14 01:30:59 +00:00
|
|
|
|
2024-10-14 16:30:24 +00:00
|
|
|
- name: Check if autorestic is installed
|
|
|
|
ansible.builtin.stat:
|
2024-10-14 01:30:59 +00:00
|
|
|
path: /usr/local/bin/autorestic
|
|
|
|
register: autorestic_status
|
|
|
|
|
|
|
|
- name: Install autorestic
|
2024-10-14 16:30:24 +00:00
|
|
|
ansible.builtin.shell: set -o pipefail && wget -qO - https://raw.githubusercontent.com/cupcakearmy/autorestic/master/install.sh | bash
|
2024-10-14 01:30:59 +00:00
|
|
|
args:
|
|
|
|
executable: /bin/bash
|
2024-10-14 16:30:24 +00:00
|
|
|
when: not autorestic_status.stat.exists
|
|
|
|
changed_when: true
|
2024-10-14 01:30:59 +00:00
|
|
|
become: true
|
|
|
|
|
2024-10-14 16:30:24 +00:00
|
|
|
- name: Check if restic is installed
|
|
|
|
ansible.builtin.stat:
|
2024-10-14 01:30:59 +00:00
|
|
|
path: /usr/local/bin/restic
|
|
|
|
register: restic_status
|
|
|
|
|
|
|
|
- name: Install restic
|
2024-10-14 16:30:24 +00:00
|
|
|
ansible.builtin.command: autorestic install
|
2024-10-14 01:30:59 +00:00
|
|
|
when: not restic_status.stat.exists
|
2024-10-14 16:30:24 +00:00
|
|
|
changed_when: true
|
2024-10-14 01:30:59 +00:00
|
|
|
become: true
|