1
0
Fork 0
mirror of https://github.com/roles-ansible/role-postgresql-backup.git synced 2024-08-16 10:19:49 +02:00

make cron optional

This commit is contained in:
L3D 2020-07-09 16:33:35 +02:00 committed by L3D
parent d88b3f82c4
commit bdc2031f0d
No known key found for this signature in database
GPG key ID: 5215C3441797AB2B
3 changed files with 7 additions and 2 deletions

View file

@ -5,9 +5,11 @@ submodules_versioncheck: false
postgresql_backup:
required_packages:
- postgresql-client
- cron
backup_dir: /var/backup/postgresql
date_format: '%Y-%m-%d_%H-%M'
user: root
cron: true
cron_minute: '*'
cron_hour: '0'
databases: []

View file

@ -1,7 +1,7 @@
---
- name: combine postgresql_backup configuration
set_fact:
ranger: "{{ _postgresql_backup|combine(postgresql_backup, recursive=True) }}"
postgresql_backup: "{{ _postgresql_backup|combine(postgresql_backup, recursive=True) }}"
- include_tasks: versioncheck.yml
when: submodules_versioncheck|bool
@ -26,3 +26,4 @@
hour: "{{ postgresql_backup.cron_hour | default( '0' ) }}"
job: /opt/postgresql-backup-script.sh >/dev/null 2>&1
user: "{{ postgresql_backup.user }}"
when: postgresql_backup.cron

View file

@ -2,13 +2,15 @@
_postgresql_backup:
required_packages:
- postgresql-client
- cron
backup_dir: /var/backup/postgresql
date_format: '%Y-%m-%d_%H-%M'
user: root
cron: true
cron_minute: '*'
cron_hour: '0'
databases: []
# versionscheck
playbook_version_number: 20 # should be int
playbook_version_number: 21 # should be int
playbook_version_path: 'role-postgresql-backup_roles-ansible_github.com.version' # unique string