automysqlbackup configuration via dict

This commit is contained in:
phil 2023-11-04 11:01:20 +01:00
parent 66b59e15f6
commit 4a456923a4
5 changed files with 28 additions and 36 deletions

View file

@ -1,24 +1,5 @@
# {{ ansible_managed }}
DBHOST={{ automysqlbackup_dbhost }}
DBNAMES=`mysql --defaults-file=/etc/mysql/debian.cnf --execute="SHOW DATABASES" | awk '{print $1}' | grep -v ^Database$ | grep -v ^mysql$ | grep -v ^performance_schema$ | grep -v ^information_schema$ | tr \\\r\\\n ,\ `
BACKUPDIR="{{ automysqlbackup_backupdir }}"
MAILCONTENT="quiet"
MAXATTSIZE="4000"
MAILADDR="{{ automysqlbackup_mailaddr }}"
MDBNAMES="mysql $DBNAMES"
DBEXCLUDE=""
CREATE_DATABASE=yes
SEPDIR=yes
DOWEEKLY=6
DOMONTHLY=01
COMP=gzip
COMPDIRECT=no
COMMCOMP=no
LATEST=no
MAX_ALLOWED_PACKET=
SOCKET=
PREBACKUP=
POSTBACKUP="{{ automysqlbackup_postbackup }}"
ROUTINES=yes
OPTIONS=""
{% for key, value in automysqlbackup_config.items() %}
{{ key | upper }}={{ value }}
{% endfor %}