diff --git a/meta/main.yml b/meta/main.yml index 27b7a86..d70a137 100644 --- a/meta/main.yml +++ b/meta/main.yml @@ -18,10 +18,13 @@ galaxy_info: - trusty - xenial - bionic + - name: Archlinux + versions: + - all galaxy_tags: - backup - cloud - system - security -allow_duplicates: true \ No newline at end of file +allow_duplicates: true diff --git a/molecule/default/Dockerfile.j2 b/molecule/default/Dockerfile.j2 index 4227711..9ca1d6d 100644 --- a/molecule/default/Dockerfile.j2 +++ b/molecule/default/Dockerfile.j2 @@ -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 diff --git a/molecule/default/converge.yml b/molecule/default/converge.yml index 4b0e975..a8c57d5 100644 --- a/molecule/default/converge.yml +++ b/molecule/default/converge.yml @@ -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 diff --git a/molecule/default/molecule.yml b/molecule/default/molecule.yml index f8c8439..6927d92 100644 --- a/molecule/default/molecule.yml +++ b/molecule/default/molecule.yml @@ -4,6 +4,8 @@ dependency: driver: name: docker platforms: + - name: archlinux-latest + image: archlinux:latest - name: centos-7 image: centos:7 - name: centos-8 diff --git a/tasks/Archlinux.yml b/tasks/Archlinux.yml new file mode 100644 index 0000000..ed97d53 --- /dev/null +++ b/tasks/Archlinux.yml @@ -0,0 +1 @@ +--- diff --git a/vars/Archlinux.yml b/vars/Archlinux.yml new file mode 100644 index 0000000..0da7866 --- /dev/null +++ b/vars/Archlinux.yml @@ -0,0 +1,14 @@ +--- +borg_packages: + - gcc + - python-pip + - openssh + - cronie + +borg_python_packages: + - cython + - borgbackup + - borgmatic + +python_bin: python3 +pip_bin: pip3