--- # 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 when: (not excluded_roles or "drupal" not in excluded_roles) and drupal_install_drupal and collect_config is defined and collect_config - block: - name: Set collect task for db-dump set_fact: collectTask: 'db' tags: - collect_db_dump - name: Set collect task for asset-archive set_fact: collectTask: 'assets' tags: - collect_asset_archive - name: Collect and Download include_tasks: collect_download/main.yml with_items: '{{ drupal_settings|default([]) }}' loop_control: loop_var: drupal when: siteproject is not defined or siteproject == 'no' or drupal.siteproject is not defined or (siteproject == drupal.siteproject and drupal.src.git.branch|default('master') == branch) tags: - collect_db_dump - collect_asset_archive when: (not excluded_roles or "drupal" not in excluded_roles) and drupal_install_drupal and collect_download is defined and collect_download - block: - name: Copy data from stage to stage include_tasks: copy_data/main.yml with_items: '{{ drupal_settings|default([]) }}' loop_control: loop_var: drupal when: siteproject is defined and drupal.siteproject is defined and siteproject == drupal.siteproject and destination_branch == drupal.src.git.branch tags: - copy_db_and_assets