Add logrotate for backup gitea and vault

This commit is contained in:
2023-11-11 17:07:25 +01:00
parent c1b01f8ac0
commit c62f16d2e2
4 changed files with 39 additions and 5 deletions

View File

@@ -4,10 +4,23 @@ callback_whitelist = timer, profile_tasks, log_plays
#log_path= /var/log/ansible/ansible-base.log #log_path= /var/log/ansible/ansible-base.log
display_args_to_stdout= true display_args_to_stdout= true
load_callback_plugins= yes load_callback_plugins= yes
#callback_plugins=/Users/stephanegratias/Library/Python/3.11/lib/python/site-packages/ara/plugins/callback
#to keep display output, comment stdout_callback #to keep display output, comment stdout_callback
#stdout_callback= log_plays #stdout_callback= log_plays
# [ssh_connection] # [ssh_connection]
# ssh_args=-o ForwardAgent=yes # ssh_args=-o ForwardAgent=yes
# [ara]
# api_client = http
# api_server = https://ara.jingoh.fr
# # api_username = test
# # api_password = teetst
# localhost_as_hostname_format=hostname
# argument_labels = check,subset,tags
# default_labels=lab
# # ignored_facts =
# ignored_files = .ansible/tmp,vault.yaml,vault.yml
# ignored_arguments = vault_password_files

View File

@@ -150,6 +150,17 @@ logrotate_scripts:
# script: docker-compose restart gitea # script: docker-compose restart gitea
# - postrotate: docker-compose restart vaultwarden # - postrotate: docker-compose restart vaultwarden
# - postrotate: docker-compose restart grafana # - postrotate: docker-compose restart grafana
- name: dockerapps-backup
paths:
- /opt/dockerapps/backup/gitea-dump-*.zip
- /opt/dockerapps/appdata/vaultwarden/backup/*.gpg
- /opt/dockerapps/appdata/vaultwarden/backup/*gpg.1.gz
options:
- rotate 12
- monthly
- compress
- missingok
- delaycompress
########## ##########

17
hosts
View File

@@ -1,6 +1,6 @@
; [perso] [perso]
; ovh_fr ansible_host=37.187.127.90 ansible_user=stephane ovh_fr ansible_host=37.187.127.90 ansible_user=stephane
; scaleway_fr ansible_host=163.172.84.28 ansible_user=stephane scaleway_fr ansible_host=163.172.84.28 ansible_user=stephane
; # TO KNOW WHOIS CHISEL SERVER ; # TO KNOW WHOIS CHISEL SERVER
; [server] ; [server]
@@ -20,4 +20,13 @@
; ubuntu-worker ansible_host=192.168.33.11 ansible_user=vagrant ansible_password=vagrant ; ubuntu-worker ansible_host=192.168.33.11 ansible_user=vagrant ansible_password=vagrant
#kubectl label node ubuntu-worker node-role.kubernetes.io/worker ubuntu-worker #kubectl label node ubuntu-worker node-role.kubernetes.io/worker ubuntu-worker
; curl -v -X POST \
; -H "Content-Type: application/json" \
; -d '{
; "auth": "admin",
; "password": "test"
; }' \
; https://semaphore.jingoh.fr/auth/login

View File

@@ -17,6 +17,7 @@
msg: "{{ ansible_hostname }} : {{ ansible_distribution }} {{ ansible_distribution_version }} - {{ ansible_default_ipv4.address }}" msg: "{{ ansible_hostname }} : {{ ansible_distribution }} {{ ansible_distribution_version }} - {{ ansible_default_ipv4.address }}"
tags: tags:
- always - always
- test
- name: Add the overlay and br_netfilter modules and make sure it is loaded after reboots - name: Add the overlay and br_netfilter modules and make sure it is loaded after reboots
community.general.modprobe: community.general.modprobe: