mirror of
https://github.com/borgbase/ansible-role-borgbackup.git
synced 2024-11-19 19:07:42 +01:00
parent
995c866c22
commit
b99de011fc
@ -19,19 +19,29 @@
|
|||||||
name: "{{ borg_packages }}"
|
name: "{{ borg_packages }}"
|
||||||
state: present
|
state: present
|
||||||
|
|
||||||
- name: Update setuptools if needed
|
- name: Create virtualenv for borg
|
||||||
tags: skip_ansible_lint
|
|
||||||
pip:
|
pip:
|
||||||
name: setuptools
|
name: pip-tools
|
||||||
state: latest
|
virtualenv: /opt/borgmatic
|
||||||
executable: "{{ pip_bin }}"
|
virtualenv_command: "{{ python_bin }} -m venv"
|
||||||
|
|
||||||
- name: Install required Python Packages
|
- name: Install required Python Packages
|
||||||
pip:
|
pip:
|
||||||
name: "{{ borg_python_packages }}"
|
name: "{{ borg_python_packages }}"
|
||||||
executable: "{{ pip_bin }}"
|
virtualenv: /opt/borgmatic
|
||||||
when: borg_python_packages is defined
|
when: borg_python_packages is defined
|
||||||
|
|
||||||
|
- name: Create borgmatic command in /usr/local/bin
|
||||||
|
copy:
|
||||||
|
content: |
|
||||||
|
#!/bin/bash
|
||||||
|
. /opt/borgmatic/bin/activate
|
||||||
|
borgmatic "$@"
|
||||||
|
dest: /usr/local/bin/borgmatic
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: "0755"
|
||||||
|
|
||||||
- name: Ensure root has SSH key.
|
- name: Ensure root has SSH key.
|
||||||
user:
|
user:
|
||||||
name: "root"
|
name: "root"
|
||||||
|
@ -8,6 +8,7 @@ borg_packages:
|
|||||||
- python3-dev
|
- python3-dev
|
||||||
- python3-pip
|
- python3-pip
|
||||||
- python3-msgpack
|
- python3-msgpack
|
||||||
|
- python3-venv
|
||||||
- openssh-client
|
- openssh-client
|
||||||
- cron
|
- cron
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@ borg_packages:
|
|||||||
- python3-wheel
|
- python3-wheel
|
||||||
- python3-devel
|
- python3-devel
|
||||||
- python3-setuptools
|
- python3-setuptools
|
||||||
|
- python3-virtualenv
|
||||||
- openssh-clients
|
- openssh-clients
|
||||||
- cronie
|
- cronie
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user