Skip to content
Snippets Groups Projects
Commit ebde7b2e authored by jurgenhaas's avatar jurgenhaas
Browse files

ansible-roles/drush#4 Remove old crontabs

parent 95897928
No related branches found
No related tags found
No related merge requests found
......@@ -10,6 +10,11 @@
webRoot='{{ jailroot }}/{{ drupal.jail.name }}/var/www'
drushSubkey='{{ drupal.jail.name }}'
when: drupal.jail is defined
- set_fact:
drushAlias='@{{ drupal.id }}'
- set_fact:
drushAlias='@{{ inventory_hostname }}{{ drushSubkey }}'
when: drush_version_main|default('8') == '8'
tags: 'always'
- name: "Ensure Drush Directories in Project Root"
......@@ -46,7 +51,15 @@
weekday: '{{ drush_cron_core.weekday|default(omit) }}'
hour: '{{ drush_cron_core.hour|default(omit) }}'
minute: '{{ drush_cron_core.minute|default(omit) }}'
job: 'cd {{ webRoot }} && /usr/local/bin/drush -y @{{ drushSubkey }} core-cron >/dev/null 2>&1'
job: 'cd {{ webRoot }} && /usr/local/bin/drush -y {{ drushAlias }} core-cron >/dev/null 2>&1'
disabled: '{{ crons_disabled|default(false) }}'
when: drush_cron_core.active
tags: 'cron'
- name: "Remove old crontabs"
cron:
name: '{{ item }} @{{ inventory_hostname }}.{{ drushSubkey }}'
state: 'absent'
with_items:
- 'Run Drush Translation Refresh on'
- 'Run Drush Translation Update on'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment