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

ansible-playbooks/general#85 Name set_fact tasks

parent baec82d6
No related branches found
No related tags found
No related merge requests found
......@@ -2,17 +2,20 @@
# file: roles/drush/tasks/config-8.yml
- block:
- set_fact:
- name: Set facts without jail
set_fact:
webRoot: /var/www{{ drupal.webRoot|default("") }}
apacheUser: www-data
drushSubkey: '{{ drupal.drush_subkey|default("") }}'
when: drupal.jail is not defined
- set_fact:
- name: Set facts with jail
set_fact:
webRoot: '{{ jailroot }}/{{ drupal.jail.name }}/var/www'
apacheUser: '{{ drupal.jail.name }}'
drushSubkey: .{{ drupal.jail.name }}
when: drupal.jail is defined
- set_fact:
- name: Set other facts
set_fact:
drupalRoot: '{{ webRoot }}{{ drupal.root|default("") }}'
drupalRootJail: /var/www{{ drupal.root|default("") }}
tags:
......@@ -71,7 +74,8 @@
state: directory
mode: 0775
- set_fact:
- name: Set excluded to no
set_fact:
excluded: no
- name: Create alias file
template:
......@@ -82,7 +86,8 @@
mode: 0440
when: drupal.create_drush_aliases|default(true)
- set_fact:
- name: Set excluded to yes
set_fact:
excluded: yes
- name: Create alias file for excluded domains
template:
......
......@@ -2,17 +2,21 @@
# file: roles/drush/tasks/config-9.yml
- block:
- set_fact:
- name: Set facts without jail
set_fact:
webRoot: /var/www{{ drupal.webRoot|default("") }}
drushSubkey: '{{ drupal.drush_subkey|default("") }}'
when: drupal.jail is not defined
- set_fact:
- name: Set facts with jail
set_fact:
webRoot: '{{ jailroot }}/{{ drupal.jail.name }}/var/www'
drushSubkey: '{{ drupal.jail.name }}'
when: drupal.jail is defined
- set_fact:
- name: Set drush alias
set_fact:
drushAlias: '@{{ drupal.id }}'
- set_fact:
- name: Set drush alias for Drush 8
set_fact:
drushAlias: '@{{ inventory_hostname }}{{ drushSubkey }}'
when: drush_version_main|default('8') == '8'
tags:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment