mirror of
https://github.com/borgbase/ansible-role-borgbackup.git
synced 2024-11-19 19:07:42 +01:00
Introduce support for Archlinux. By @michalroxorpl (#79)
This commit is contained in:
parent
10ed2c3f44
commit
aa5830aca0
@ -18,6 +18,9 @@ galaxy_info:
|
||||
- trusty
|
||||
- xenial
|
||||
- bionic
|
||||
- name: Archlinux
|
||||
versions:
|
||||
- all
|
||||
galaxy_tags:
|
||||
- backup
|
||||
- cloud
|
||||
|
@ -19,4 +19,5 @@ RUN if [ $(command -v apt-get) ]; then apt-get update && apt-get install -y pyth
|
||||
elif [ $(command -v yum) ]; then yum makecache fast && yum install -y /usr/bin/python /usr/bin/python2-config sudo yum-plugin-ovl bash iproute && sed -i 's/plugins=0/plugins=1/g' /etc/yum.conf && yum clean all; \
|
||||
elif [ $(command -v zypper) ]; then zypper refresh && zypper install -y python sudo bash python-xml iproute2 && zypper clean -a; \
|
||||
elif [ $(command -v apk) ]; then apk update && apk add --no-cache python sudo bash ca-certificates; \
|
||||
elif [ $(command -v pacman) ]; then pacman --noconfirm -Suy python sudo openssh; \
|
||||
elif [ $(command -v xbps-install) ]; then xbps-install -Syu && xbps-install -y python sudo bash ca-certificates iproute2 && xbps-remove -O; fi
|
||||
|
@ -2,10 +2,21 @@
|
||||
- name: Converge
|
||||
hosts: all
|
||||
pre_tasks:
|
||||
- name: Set ssh server package name for non-Archlinux ansible_os_family
|
||||
set_fact:
|
||||
openssh_package: "openssh-server"
|
||||
when: ansible_os_family != "Archlinux"
|
||||
|
||||
- name: Set ssh server package name for Archlinux ansible_os_family
|
||||
set_fact:
|
||||
openssh_package: "openssh"
|
||||
when: ansible_os_family == "Archlinux"
|
||||
|
||||
- name: Install openssh
|
||||
package:
|
||||
name: openssh-server
|
||||
name: "{{ openssh_package }}"
|
||||
state: present
|
||||
|
||||
roles:
|
||||
- role: m3nu.ansible_role_borgbackup
|
||||
borg_encryption_passphrase: CHANGEME
|
||||
|
@ -4,6 +4,8 @@ dependency:
|
||||
driver:
|
||||
name: docker
|
||||
platforms:
|
||||
- name: archlinux-latest
|
||||
image: archlinux:latest
|
||||
- name: centos-7
|
||||
image: centos:7
|
||||
- name: centos-8
|
||||
|
1
tasks/Archlinux.yml
Normal file
1
tasks/Archlinux.yml
Normal file
@ -0,0 +1 @@
|
||||
---
|
14
vars/Archlinux.yml
Normal file
14
vars/Archlinux.yml
Normal file
@ -0,0 +1,14 @@
|
||||
---
|
||||
borg_packages:
|
||||
- gcc
|
||||
- python-pip
|
||||
- openssh
|
||||
- cronie
|
||||
|
||||
borg_python_packages:
|
||||
- cython
|
||||
- borgbackup
|
||||
- borgmatic
|
||||
|
||||
python_bin: python3
|
||||
pip_bin: pip3
|
Loading…
Reference in New Issue
Block a user