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:
Andrea Dell'Amico 2016-12-21 13:10:22 +01:00
parent 0d74a08746
commit 93e0e74524
3 changed files with 31 additions and 1 deletions

View File

@ -1,5 +1,7 @@
---
drupal_install: False
drupal_install_deb: False
drupal_maintenance_cron: False
drupal_major: 8
drupal_version: '{{ drupal_major_ver }}.1.7'
drupal_dist_name: 'drupal-{{ drupal_version }}'
@ -30,6 +32,6 @@ drupal_php_prereq:
- php-xml-serializer
- imagemagick
drupal_install_drush: True
drupal_install_drush: False
drupal_drush_version: '{{ drupal_major }}.*'
drupal_drush_download_url: 'https://s3.amazonaws.com/files.drush.org/drush.phar'

View File

@ -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' ]

View File

@ -1,4 +1,6 @@
---
- include: drupal-main.yml
when: drupal_install
- include: drupal-utility.yml
- include: drush.yml
when: drupal_install_drush