parent
995c866c22
commit
b99de011fc
@ -19,19 +19,29 @@
|
||||
name: "{{ borg_packages }}"
|
||||
state: present
|
||||
|
||||
- name: Update setuptools if needed
|
||||
tags: skip_ansible_lint
|
||||
- name: Create virtualenv for borg
|
||||
pip:
|
||||
name: setuptools
|
||||
state: latest
|
||||
executable: "{{ pip_bin }}"
|
||||
name: pip-tools
|
||||
virtualenv: /opt/borgmatic
|
||||
virtualenv_command: "{{ python_bin }} -m venv"
|
||||
|
||||
- name: Install required Python Packages
|
||||
pip:
|
||||
name: "{{ borg_python_packages }}"
|
||||
executable: "{{ pip_bin }}"
|
||||
virtualenv: /opt/borgmatic
|
||||
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.
|
||||
user:
|
||||
name: "root"
|
||||
|
@ -8,6 +8,7 @@ borg_packages:
|
||||
- python3-dev
|
||||
- python3-pip
|
||||
- python3-msgpack
|
||||
- python3-venv
|
||||
- openssh-client
|
||||
- cron
|
||||
|
||||
|
@ -9,6 +9,7 @@ borg_packages:
|
||||
- python3-wheel
|
||||
- python3-devel
|
||||
- python3-setuptools
|
||||
- python3-virtualenv
|
||||
- openssh-clients
|
||||
- cronie
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user