From 7fa78545aec3977d36ef827fbfe78dc6bf19476a Mon Sep 17 00:00:00 2001 From: L3D Date: Thu, 9 Jul 2020 10:51:31 +0200 Subject: [PATCH] remove compress option because it is useless --- defaults/main.yml | 1 - templates/postgresql-backup-script.sh | 4 ---- vars/main.yml | 2 +- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/defaults/main.yml b/defaults/main.yml index 933c8dc..4bb04cd 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -10,7 +10,6 @@ postgresql_backup: user: root cron_minute: '*' cron_hour: '0' - compress: false databases: [] # - name: psql_database_name # user: psql_database_user diff --git a/templates/postgresql-backup-script.sh b/templates/postgresql-backup-script.sh index 116cfa6..65e87a4 100644 --- a/templates/postgresql-backup-script.sh +++ b/templates/postgresql-backup-script.sh @@ -19,11 +19,7 @@ backup_databases() { export PGPASSWORD="{{ db.password }}" {% endif %} if (umask 077 && pg_dump -F c -h "{{ db.host | default( 'localhost' ) }}" -U "{{ db.user | default( 'postgres' ) }}" -p "{{ db.port | default( '5432' ) }}" "{{ db.name }}" -f "{{ db.name }}.in_progress.psql"); then - {% if postgresql_backup.compress %} - tar -czvf "{{ db.name }}.psql.tar.gz" "{{ db.name }}.in_progress.psql" - {% else %} mv "{{ db.name }}.in_progress.psql" "{{ db.name }}.psql" - {% endif %} echo "backup of {{ db.name }} successful" else echo "failed to export {{ db.name }}" diff --git a/vars/main.yml b/vars/main.yml index 74d6049..177c1ff 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -10,5 +10,5 @@ _postgresql_backup: databases: [] # versionscheck -playbook_version_number: 18 # should be int +playbook_version_number: 19 # should be int playbook_version_path: 'role-postgresql-backup_roles-ansible_github.com.version' # unique string