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:
parent
d88b3f82c4
commit
bdc2031f0d
3 changed files with 7 additions and 2 deletions
|
@ -5,9 +5,11 @@ submodules_versioncheck: false
|
||||||
postgresql_backup:
|
postgresql_backup:
|
||||||
required_packages:
|
required_packages:
|
||||||
- postgresql-client
|
- postgresql-client
|
||||||
|
- cron
|
||||||
backup_dir: /var/backup/postgresql
|
backup_dir: /var/backup/postgresql
|
||||||
date_format: '%Y-%m-%d_%H-%M'
|
date_format: '%Y-%m-%d_%H-%M'
|
||||||
user: root
|
user: root
|
||||||
|
cron: true
|
||||||
cron_minute: '*'
|
cron_minute: '*'
|
||||||
cron_hour: '0'
|
cron_hour: '0'
|
||||||
databases: []
|
databases: []
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
---
|
---
|
||||||
- name: combine postgresql_backup configuration
|
- name: combine postgresql_backup configuration
|
||||||
set_fact:
|
set_fact:
|
||||||
ranger: "{{ _postgresql_backup|combine(postgresql_backup, recursive=True) }}"
|
postgresql_backup: "{{ _postgresql_backup|combine(postgresql_backup, recursive=True) }}"
|
||||||
|
|
||||||
- include_tasks: versioncheck.yml
|
- include_tasks: versioncheck.yml
|
||||||
when: submodules_versioncheck|bool
|
when: submodules_versioncheck|bool
|
||||||
|
@ -26,3 +26,4 @@
|
||||||
hour: "{{ postgresql_backup.cron_hour | default( '0' ) }}"
|
hour: "{{ postgresql_backup.cron_hour | default( '0' ) }}"
|
||||||
job: /opt/postgresql-backup-script.sh >/dev/null 2>&1
|
job: /opt/postgresql-backup-script.sh >/dev/null 2>&1
|
||||||
user: "{{ postgresql_backup.user }}"
|
user: "{{ postgresql_backup.user }}"
|
||||||
|
when: postgresql_backup.cron
|
||||||
|
|
|
@ -2,13 +2,15 @@
|
||||||
_postgresql_backup:
|
_postgresql_backup:
|
||||||
required_packages:
|
required_packages:
|
||||||
- postgresql-client
|
- postgresql-client
|
||||||
|
- cron
|
||||||
backup_dir: /var/backup/postgresql
|
backup_dir: /var/backup/postgresql
|
||||||
date_format: '%Y-%m-%d_%H-%M'
|
date_format: '%Y-%m-%d_%H-%M'
|
||||||
user: root
|
user: root
|
||||||
|
cron: true
|
||||||
cron_minute: '*'
|
cron_minute: '*'
|
||||||
cron_hour: '0'
|
cron_hour: '0'
|
||||||
databases: []
|
databases: []
|
||||||
|
|
||||||
# versionscheck
|
# 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
|
playbook_version_path: 'role-postgresql-backup_roles-ansible_github.com.version' # unique string
|
||||||
|
|
Loading…
Reference in a new issue