Removing cron param from map.jinja
Change-Id: I9e044a0a43d97b2ccf4453d3043bb02fe064a593
Related: PROD-28173 (PROD:28173)
diff --git a/xtrabackup/client/init.sls b/xtrabackup/client/init.sls
index 65d3075..63d59b3 100644
--- a/xtrabackup/client/init.sls
+++ b/xtrabackup/client/init.sls
@@ -33,8 +33,8 @@
cron.present:
- name: /usr/local/bin/innobackupex-runner.sh
- user: root
-{%- if client.cron is not defined %}
- - commented: true
+{%- if client.cron is defined %}
+ - commented: {{ not client.cron }}
{%- endif %}
{%- if client.backup_times is defined %}
{%- if client.backup_times.day_of_week is defined %}
diff --git a/xtrabackup/map.jinja b/xtrabackup/map.jinja
index f078f74..9eb0de3 100644
--- a/xtrabackup/map.jinja
+++ b/xtrabackup/map.jinja
@@ -7,12 +7,10 @@
{% set client = salt['grains.filter_by']({
'Debian': {
'pkgs': client_pkgs_list,
- 'cron': True,
'backup_dir': '/var/backups/mysql/xtrabackup'
},
'RedHat': {
'pkgs': client_pkgs_list,
- 'cron': True,
'backup_dir': '/var/backups/mysql/xtrabackup'
},
}, merge=salt['pillar.get']('xtrabackup:client')) %}
@@ -20,13 +18,11 @@
{% set server = salt['grains.filter_by']({
'Debian': {
'pkgs': ['rsync'],
- 'cron': True,
'restrict_clients': True,
'backup_dir': '/var/backups/mysql/xtrabackup'
},
'RedHat': {
'pkgs': ['rsync'],
- 'cron': True,
'restrict_clients': True,
'backup_dir': '/var/backups/mysql/xtrabackup'
},
diff --git a/xtrabackup/server.sls b/xtrabackup/server.sls
index 75a9b97..904090d 100644
--- a/xtrabackup/server.sls
+++ b/xtrabackup/server.sls
@@ -79,26 +79,18 @@
- require:
- pkg: xtrabackup_server_packages
-{%- if server.cron %}
-
xtrabackup_server_cron:
cron.present:
- name: /usr/local/bin/innobackupex-runner.sh
- user: xtrabackup
+{%- if server.cron is defined %}
+ - commented: {{ not server.cron }}
+{%- endif %}
- minute: 0
- hour: 2
- require:
- file: xtrabackup_server_script
-{%- else %}
-
-xtrabackup_server_cron:
- cron.absent:
- - name: /usr/local/bin/innobackupex-runner.sh
- - user: xtrabackup
-
-{%- endif %}
-
xtrabackup_server_call_restore_script:
file.managed:
- name: /usr/local/bin/innobackupex-restore-call.sh