forked from ISTI-ansible-roles/ansible-roles
library/roles/drupal-org: Defaults to False for all the steps. Add a cron job to run the maintenance tasks.
This commit is contained in:
parent
0d74a08746
commit
93e0e74524
|
@ -1,5 +1,7 @@
|
||||||
---
|
---
|
||||||
|
drupal_install: False
|
||||||
drupal_install_deb: False
|
drupal_install_deb: False
|
||||||
|
drupal_maintenance_cron: False
|
||||||
drupal_major: 8
|
drupal_major: 8
|
||||||
drupal_version: '{{ drupal_major_ver }}.1.7'
|
drupal_version: '{{ drupal_major_ver }}.1.7'
|
||||||
drupal_dist_name: 'drupal-{{ drupal_version }}'
|
drupal_dist_name: 'drupal-{{ drupal_version }}'
|
||||||
|
@ -30,6 +32,6 @@ drupal_php_prereq:
|
||||||
- php-xml-serializer
|
- php-xml-serializer
|
||||||
- imagemagick
|
- imagemagick
|
||||||
|
|
||||||
drupal_install_drush: True
|
drupal_install_drush: False
|
||||||
drupal_drush_version: '{{ drupal_major }}.*'
|
drupal_drush_version: '{{ drupal_major }}.*'
|
||||||
drupal_drush_download_url: 'https://s3.amazonaws.com/files.drush.org/drush.phar'
|
drupal_drush_download_url: 'https://s3.amazonaws.com/files.drush.org/drush.phar'
|
||||||
|
|
|
@ -0,0 +1,26 @@
|
||||||
|
---
|
||||||
|
- block:
|
||||||
|
- name: Install a cron job that runs the maintenance tasks
|
||||||
|
cron: name="Drupal maintenance tasks"
|
||||||
|
minute=0
|
||||||
|
hour=4
|
||||||
|
job="curl https://{{ item.virthost }}/cron/OUznPey7M292D0YaTmLrdEKzA8yON3W7opBgrCZMMd0e5d4J8etqjqLOinD0Hs5s8rWa-Pk9mA?absolute=1"
|
||||||
|
user={{ item.user }}
|
||||||
|
with_items: '{{ phpfpm_pools }}'
|
||||||
|
|
||||||
|
when: drupal_maintenance_cron
|
||||||
|
tags: [ 'drupal', 'drupal_cron' ]
|
||||||
|
|
||||||
|
- block:
|
||||||
|
- name: Remove the maintenance tasks cron job
|
||||||
|
cron: name="Drupal maintenance tasks"
|
||||||
|
minute=0
|
||||||
|
hour=4
|
||||||
|
job="curl https://{{ item.virthost }}/cron/OUznPey7M292D0YaTmLrdEKzA8yON3W7opBgrCZMMd0e5d4J8etqjqLOinD0Hs5s8rWa-Pk9mA?absolute=1"
|
||||||
|
user={{ item.user }}
|
||||||
|
state=absent
|
||||||
|
with_items: '{{ phpfpm_pools }}'
|
||||||
|
|
||||||
|
when: not drupal_maintenance_cron
|
||||||
|
tags: [ 'drupal', 'drupal_cron' ]
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
---
|
---
|
||||||
- include: drupal-main.yml
|
- include: drupal-main.yml
|
||||||
|
when: drupal_install
|
||||||
|
- include: drupal-utility.yml
|
||||||
- include: drush.yml
|
- include: drush.yml
|
||||||
when: drupal_install_drush
|
when: drupal_install_drush
|
||||||
|
|
Loading…
Reference in New Issue