mirror of
https://github.com/borgbase/ansible-role-borgbackup.git
synced 2024-11-19 19:07:42 +01:00
Add Manjaro support (by @verbumfeit), CI fixes. (#65)
Co-authored-by: verbumfeit <verbumfeit@tuta.io>
This commit is contained in:
parent
7925d31198
commit
3bd0b3d497
8
.github/workflows/main.yml
vendored
8
.github/workflows/main.yml
vendored
@ -12,10 +12,10 @@ jobs:
|
||||
with:
|
||||
python-version: 3.7
|
||||
- name: Install Molecule
|
||||
run: pip install molecule[lint,docker]
|
||||
- name: Lint
|
||||
run: |
|
||||
yamllint .
|
||||
ansible-lint
|
||||
pip install -U pip setuptools wheel
|
||||
pip install -r requirements-dev.txt
|
||||
# - name: Debugging with tmate
|
||||
# uses: mxschmitt/action-tmate@v3.5
|
||||
- name: Test using Molecule
|
||||
run: molecule test
|
@ -1,5 +1,8 @@
|
||||
---
|
||||
# Based on ansible-lint config
|
||||
ignore: |
|
||||
.direnv
|
||||
|
||||
extends: default
|
||||
|
||||
rules:
|
||||
|
@ -17,7 +17,7 @@ Main features:
|
||||
```
|
||||
- hosts: webservers
|
||||
roles:
|
||||
- role: borgbackup
|
||||
- role: m3nu.ansible_role_borgbackup
|
||||
borg_encryption_passphrase: CHANGEME
|
||||
borg_repository: m5vz9gp4@m5vz9gp4.repo.borgbase.com:repo
|
||||
borg_source_directories:
|
||||
@ -44,7 +44,7 @@ $ ansible-galaxy install m3nu.ansible_role_borgbackup
|
||||
Clone to local folder
|
||||
|
||||
```
|
||||
$ git clone https://github.com/borgbase/ansible-role-borgbackup.git roles/borgbackup
|
||||
$ git clone https://github.com/borgbase/ansible-role-borgbackup.git roles/ansible_role_borgbackup
|
||||
```
|
||||
|
||||
|
||||
|
@ -3,6 +3,8 @@ dependencies: []
|
||||
|
||||
galaxy_info:
|
||||
author: Manuel Riel
|
||||
role_name: ansible_role_borgbackup
|
||||
namespace: m3nu
|
||||
description: Set up backup to remote machine using Borg and Borgmatic.
|
||||
company: "BorgBase.com"
|
||||
license: license (BSD, MIT)
|
||||
|
@ -7,7 +7,7 @@
|
||||
name: openssh-server
|
||||
state: present
|
||||
roles:
|
||||
- role: ansible-role-borgbackup
|
||||
- role: m3nu.ansible_role_borgbackup
|
||||
borg_encryption_passphrase: CHANGEME
|
||||
borg_repository: m5vz9gp4@m5vz9gp4.repo.borgbase.com:repo
|
||||
borg_source_directories:
|
||||
|
@ -10,10 +10,6 @@ platforms:
|
||||
image: centos:latest
|
||||
- name: fedora-latest
|
||||
image: fedora:latest
|
||||
- name: fedora-31
|
||||
image: fedora:31
|
||||
- name: debian-oldstable
|
||||
image: debian:oldstable
|
||||
- name: debian-stable
|
||||
image: debian:stable
|
||||
- name: ubuntu-bionic
|
||||
@ -24,3 +20,7 @@ provisioner:
|
||||
name: ansible
|
||||
verifier:
|
||||
name: ansible
|
||||
lint: |
|
||||
set -e
|
||||
yamllint .
|
||||
ansible-lint .
|
@ -1,3 +1,3 @@
|
||||
molecule[lint,docker]
|
||||
ansible
|
||||
ansible-lint
|
||||
testinfra
|
||||
molecule[lint,docker]
|
@ -1,7 +1 @@
|
||||
---
|
||||
- name: Install EPEL repo
|
||||
yum:
|
||||
pkg: epel-release
|
||||
state: installed
|
||||
update_cache: yes
|
||||
when: ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux'
|
||||
|
@ -6,8 +6,9 @@
|
||||
- "{{ ansible_os_family }}-{{ ansible_distribution_major_version }}.yml"
|
||||
- "{{ ansible_distribution }}.yml"
|
||||
- "{{ ansible_os_family }}.yml"
|
||||
- "{{ ansible_lsb.id }}.yml"
|
||||
|
||||
- name: Run OS-specific setup
|
||||
- name: Run OS-specific tasks
|
||||
include: "{{ item }}"
|
||||
with_first_found:
|
||||
- "{{ ansible_os_family }}-{{ ansible_distribution_major_version }}.yml"
|
||||
@ -39,7 +40,8 @@
|
||||
ssh_key_type: ed25519
|
||||
register: root_user
|
||||
|
||||
- debug:
|
||||
- name: Print key created for root user (use for remote repo)
|
||||
debug:
|
||||
var: root_user['ssh_public_key']
|
||||
|
||||
- name: Create new repository for server
|
||||
|
8
vars/ManjaroLinux.yml
Normal file
8
vars/ManjaroLinux.yml
Normal file
@ -0,0 +1,8 @@
|
||||
---
|
||||
borg_packages:
|
||||
- borgmatic
|
||||
- openssh
|
||||
- cronie
|
||||
|
||||
python_bin: python3
|
||||
pip_bin: pip3
|
Loading…
Reference in New Issue
Block a user