refactor common role

This commit is contained in:
HgO
2020-11-28 20:47:30 +01:00
parent 67b8c5f230
commit 2b8f69fc41
45 changed files with 756 additions and 110 deletions

View File

@@ -3,9 +3,96 @@
node_exporter_path: /
node_exporter_port: 9100
node_exporter_public_port: "9180"
node_exporter_password: password
nginx_config_dir: /etc/nginx/conf.d
nginx_ssl_dir: /etc/nginx/ssl
nginx_dhparam_size: 2048
ssh_config_dir: ~/.ssh
backup_targets: []
users:
- name: ppbe
- name: coco
groups: []
user_default_groups:
- sudo
openssh_port: "22"
backup_owner: backup
backup_group: "{{ backup_owner }}"
storage_box_enabled: no
storage_box_host: storage.example.com
storage_box_port: 23
storage_box_path: /home/backup
storage_box_mount:
path: "/mnt/backup"
owner: "{{ backup_owner }}"
group: "{{ backup_group }}"
options: [rw,default_permissions]
storage_box_username: u123456-sub1
storage_box_password: somesecret
borg_encryption_mode: keyfile
borg_passphrase: "{{ vault_borg_passphrase }}"
borg_repository: |-
{%- if storage_box_enabled -%}
{{ storage_box_host }}:{{ storage_box_path }}/borg
{%- else -%}
{{ storage_box_mount.path }}/borg
{%- endif -%}
borgmatic_config:
location:
source_directories:
- /
repositories:
- "{{ borg_repository }}"
exclude_patterns:
- /dev
- /home/*/.cache
- /home/*/.gvfs
- /lib*
- /media
- /mnt
- /proc
- /tmp
- /run
- /swap*
- /sys
- /usr/src/linux-headers*
- /var/backups
- /var/cache/apt/archives
- /var/lib
- /var/log
- /var/run
- /var/snap
exclude_caches: true
storage:
encryption_passphrase: "{{ borg_passphrase }}"
compression: zlib,7
retention:
keep_hourly: 24
keep_daily: 7
keep_weekly: 4
keep_monthly: 6
borgmatic_cron_hour: "3"
borgmatic_cron_minute: "0"
borgmatic_check_cron_weekday: "0"
borgmatic_check_cron_hour: "2"
borgmatic_check_cron_minute: "0"
smtp_accounts:
example:
host: mail.example.com
port: 587
from: no-reply@example.com
username: ahoy@example.com
password: secret
smtp_default_account: example
smtp_default_recipient: contact@example.com
smtp_aliases_path: /etc/aliases
postfix_sasl_secrets_path: /etc/postfix/sasl/passwd
postfix_senders_map_path: /etc/postfix/senders

View File

@@ -0,0 +1,9 @@
$ANSIBLE_VAULT;1.1;AES256
66613631383234346131623731643533326566373463623935666636383464663639353164323861
3464306432333534393565333334623965393363333365380a613764323664316338306532386331
63353363633566373365623732636163366631656563393961333261623030363834376537643732
6264373861313764390a306462323932333935653866373362383566333934386136336466623163
39373332383733326261343162626336663135336561366137366466396463323762393538383333
31663337393538623730326464316461323034636330626630616538316431633234306262613132
36633164623162346231656364346363646563396664356337323763663135303963383533353838
35396634386135386139