File tree 10 files changed +30
-21
lines changed
10 files changed +30
-21
lines changed Original file line number Diff line number Diff line change @@ -12,10 +12,10 @@ jobs:
12
12
with :
13
13
python-version : 3.7
14
14
- name : Install Molecule
15
- run : pip install molecule[lint,docker]
16
- - name : Lint
17
15
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]
20
20
- name : Test using Molecule
21
21
run : molecule test
Original file line number Diff line number Diff line change 1
1
---
2
2
# Based on ansible-lint config
3
+ ignore: |
4
+ .direnv
5
+
3
6
extends: default
4
7
5
8
rules:
Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ Main features:
17
17
```
18
18
- hosts: webservers
19
19
roles:
20
- - role: borgbackup
20
+ - role: m3nu.ansible_role_borgbackup
21
21
borg_encryption_passphrase: CHANGEME
22
22
borg_repository: [email protected] :repo
23
23
borg_source_directories:
@@ -44,7 +44,7 @@ $ ansible-galaxy install m3nu.ansible_role_borgbackup
44
44
Clone to local folder
45
45
46
46
```
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
48
48
```
49
49
50
50
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ dependencies: []
3
3
4
4
galaxy_info :
5
5
author : Manuel Riel
6
+ role_name : ansible_role_borgbackup
7
+ namespace : m3nu
6
8
description : Set up backup to remote machine using Borg and Borgmatic.
7
9
company : " BorgBase.com"
8
10
license : license (BSD, MIT)
Original file line number Diff line number Diff line change 7
7
name : openssh-server
8
8
state : present
9
9
roles :
10
- - role : ansible-role-borgbackup
10
+ - role : m3nu.ansible_role_borgbackup
11
11
borg_encryption_passphrase : CHANGEME
12
12
borg_repository :
[email protected] :repo
13
13
borg_source_directories :
Original file line number Diff line number Diff line change @@ -10,10 +10,6 @@ platforms:
10
10
image : centos:latest
11
11
- name : fedora-latest
12
12
image : fedora:latest
13
- - name : fedora-31
14
- image : fedora:31
15
- - name : debian-oldstable
16
- image : debian:oldstable
17
13
- name : debian-stable
18
14
image : debian:stable
19
15
- name : ubuntu-bionic
@@ -24,3 +20,7 @@ provisioner:
24
20
name : ansible
25
21
verifier :
26
22
name : ansible
23
+ lint : |
24
+ set -e
25
+ yamllint .
26
+ ansible-lint .
Original file line number Diff line number Diff line change 1
- molecule [ lint,docker ]
1
+ ansible
2
2
ansible-lint
3
- testinfra
3
+ molecule [ lint,docker ]
Original file line number Diff line number Diff line change 1
1
---
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'
Original file line number Diff line number Diff line change 6
6
- " {{ ansible_os_family }}-{{ ansible_distribution_major_version }}.yml"
7
7
- " {{ ansible_distribution }}.yml"
8
8
- " {{ ansible_os_family }}.yml"
9
+ - " {{ ansible_lsb.id }}.yml"
9
10
10
- - name : Run OS-specific setup
11
+ - name : Run OS-specific tasks
11
12
include : " {{ item }}"
12
13
with_first_found :
13
14
- " {{ ansible_os_family }}-{{ ansible_distribution_major_version }}.yml"
39
40
ssh_key_type : ed25519
40
41
register : root_user
41
42
42
- - debug :
43
+ - name : Print key created for root user (use for remote repo)
44
+ debug :
43
45
var : root_user['ssh_public_key']
44
46
45
47
- name : Create new repository for server
Original file line number Diff line number Diff line change
1
+ ---
2
+ borg_packages :
3
+ - borgmatic
4
+ - openssh
5
+ - cronie
6
+
7
+ python_bin : python3
8
+ pip_bin : pip3
You can’t perform that action at this time.
0 commit comments