-
jurgenhaas authoredjurgenhaas authored
main.yml 3.61 KiB
---
# file: roles/drupal/tasks/main.yml
- name: Drupal Role
set_fact:
role_drupal_started: yes
tags:
- always
- block:
- name: Install Certs
include_tasks: ../../letsencrypt/tasks/cert.yml
with_subelements:
- '{{ drupal_settings|default([]) }}'
- domains
loop_control:
loop_var: domain
when: domain.1.protocol|default("https") == "https" and domain.1.letsencrypt|default(true) and (limit_site is not defined or limit_site == 'no' or domain.0.id is not defined or limit_site == domain.0.id)
tags:
- ApacheConfig
when: (not excluded_roles or "letsencrypt" not in excluded_roles) and groups.proxyserver is not defined
- block:
- name: Install Drupal
include_tasks: install.yml
with_items: '{{ drupal_settings|default([]) }}'
loop_control:
loop_var: drupal
when: limit_site is not defined or limit_site == 'no' or drupal.id is not defined or limit_site == drupal.id
tags:
- ApacheConfig
- cron
- deploy
- SetPermissions
- mysql
- name: Install HAProxy redirects collector
include_tasks: haproxy_redirects_collector.yml
tags:
- haproxy_redirects_collector
- name: Install crontabs collector
include_tasks: crontabs_collector.yml
tags:
- crontabs_collector
when: (not excluded_roles or "drupal" not in excluded_roles) and drupal_install_drupal and (collect_config is not defined or not collect_config)
- block:
- name: Collect Drupal Configuration
include_tasks: collect_config/main.yml
with_items: '{{ drupal_settings|default([]) }}'
loop_control:
loop_var: drupal
when: siteproject is not defined and (limit_site is not defined or limit_site == 'no' or drupal.id is not defined or limit_site == drupal.id)
tags:
- deploy
- name: Collect Drupal Configuration NG
include_tasks: collect_config/main.yml
with_items: '{{ drupal_settings|default([]) }}'
loop_control:
loop_var: drupal
when: limit_site is not defined and (siteproject is not defined or siteproject == 'no' or drupal.siteproject is not defined or (siteproject == drupal.siteproject and drupal.src.git.branch == 'master'))
tags:
- deploy