Skip to content

Commit 3bd0b3d

Browse files
m3nuverbumfeit
andauthored
Add Manjaro support (by @verbumfeit), CI fixes. (borgbase#65)
Co-authored-by: verbumfeit <[email protected]>
1 parent 7925d31 commit 3bd0b3d

File tree

10 files changed

+30
-21
lines changed

10 files changed

+30
-21
lines changed

.github/workflows/main.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ jobs:
1212
with:
1313
python-version: 3.7
1414
- name: Install Molecule
15-
run: pip install molecule[lint,docker]
16-
- name: Lint
1715
run: |
18-
yamllint .
19-
ansible-lint
16+
pip install -U pip setuptools wheel
17+
pip install -r requirements-dev.txt
18+
# - name: Debugging with tmate
19+
# uses: mxschmitt/[email protected]
2020
- name: Test using Molecule
2121
run: molecule test

.yamllint

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
---
22
# Based on ansible-lint config
3+
ignore: |
4+
.direnv
5+
36
extends: default
47

58
rules:

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Main features:
1717
```
1818
- hosts: webservers
1919
roles:
20-
- role: borgbackup
20+
- role: m3nu.ansible_role_borgbackup
2121
borg_encryption_passphrase: CHANGEME
2222
borg_repository: [email protected]:repo
2323
borg_source_directories:
@@ -44,7 +44,7 @@ $ ansible-galaxy install m3nu.ansible_role_borgbackup
4444
Clone to local folder
4545

4646
```
47-
$ git clone https://github.com/borgbase/ansible-role-borgbackup.git roles/borgbackup
47+
$ git clone https://github.com/borgbase/ansible-role-borgbackup.git roles/ansible_role_borgbackup
4848
```
4949

5050

meta/main.yml

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ dependencies: []
33

44
galaxy_info:
55
author: Manuel Riel
6+
role_name: ansible_role_borgbackup
7+
namespace: m3nu
68
description: Set up backup to remote machine using Borg and Borgmatic.
79
company: "BorgBase.com"
810
license: license (BSD, MIT)

molecule/default/converge.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
name: openssh-server
88
state: present
99
roles:
10-
- role: ansible-role-borgbackup
10+
- role: m3nu.ansible_role_borgbackup
1111
borg_encryption_passphrase: CHANGEME
1212
borg_repository: [email protected]:repo
1313
borg_source_directories:

molecule/default/molecule.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ platforms:
1010
image: centos:latest
1111
- name: fedora-latest
1212
image: fedora:latest
13-
- name: fedora-31
14-
image: fedora:31
15-
- name: debian-oldstable
16-
image: debian:oldstable
1713
- name: debian-stable
1814
image: debian:stable
1915
- name: ubuntu-bionic
@@ -24,3 +20,7 @@ provisioner:
2420
name: ansible
2521
verifier:
2622
name: ansible
23+
lint: |
24+
set -e
25+
yamllint .
26+
ansible-lint .

requirements-dev.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
molecule[lint,docker]
1+
ansible
22
ansible-lint
3-
testinfra
3+
molecule[lint,docker]

tasks/RedHat.yml

-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1 @@
11
---
2-
- name: Install EPEL repo
3-
yum:
4-
pkg: epel-release
5-
state: installed
6-
update_cache: yes
7-
when: ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux'

tasks/main.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66
- "{{ ansible_os_family }}-{{ ansible_distribution_major_version }}.yml"
77
- "{{ ansible_distribution }}.yml"
88
- "{{ ansible_os_family }}.yml"
9+
- "{{ ansible_lsb.id }}.yml"
910

10-
- name: Run OS-specific setup
11+
- name: Run OS-specific tasks
1112
include: "{{ item }}"
1213
with_first_found:
1314
- "{{ ansible_os_family }}-{{ ansible_distribution_major_version }}.yml"
@@ -39,7 +40,8 @@
3940
ssh_key_type: ed25519
4041
register: root_user
4142

42-
- debug:
43+
- name: Print key created for root user (use for remote repo)
44+
debug:
4345
var: root_user['ssh_public_key']
4446

4547
- name: Create new repository for server

vars/ManjaroLinux.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
borg_packages:
3+
- borgmatic
4+
- openssh
5+
- cronie
6+
7+
python_bin: python3
8+
pip_bin: pip3

0 commit comments

Comments
 (0)