From 666e1383fae1e2f1aa3f97dda446d489f111209a Mon Sep 17 00:00:00 2001 From: Seth Shaw Date: Fri, 19 Jan 2018 10:13:22 -0800 Subject: [PATCH 1/2] Update drush to use drush_path --- roles/internal/webserver-app/tasks/drupal.yml | 10 +++++----- roles/internal/webserver-app/tasks/jwt.yml | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/roles/internal/webserver-app/tasks/drupal.yml b/roles/internal/webserver-app/tasks/drupal.yml index 4ebb6a7e..dec86379 100644 --- a/roles/internal/webserver-app/tasks/drupal.yml +++ b/roles/internal/webserver-app/tasks/drupal.yml @@ -13,14 +13,14 @@ marker: // {mark} ANSIBLE MANAGED BLOCK - name: Uninstall core search module - command: drush -y pm-uninstall search + command: "{{ drush_path }} -y pm-uninstall search" args: chdir: "{{ drupal_core_path }}" register: uninstall_search changed_when: "'successfully uninstalled' in uninstall_search.stdout" - name: Test if theme is Carapace - command: drush -y config-get system.theme default + command: "{{ drush_path }} -y config-get system.theme default" args: chdir: "{{ drupal_core_path }}" register: drupal_theme_carapace @@ -28,7 +28,7 @@ check_mode: no - name: Set theme to carapace - command: drush -y config-set system.theme default carapace + command: "{{ drush_path }} -y config-set system.theme default carapace" args: chdir: "{{ drupal_core_path }}" when: "'carapace' not in drupal_theme_carapace.stdout" @@ -85,7 +85,7 @@ register: drupal_media_rest - name: Install config - command: drush config-import -y --partial --source="{{ webserver_app_drupal_config_path }}" + command: "{{ drush_path }} config-import -y --partial --source={{ webserver_app_drupal_config_path }}" args: chdir: "{{ drupal_core_path }}" when: (drupal_member_block.changed is defined and drupal_member_block.changed) or @@ -94,7 +94,7 @@ (drupal_media_rest.changed is defined and drupal_media_rest.changed) - name: Set default solr server to point to CLAW core - command: drush -y config-set search_api.server.default_solr_server backend_config.connector_config.core CLAW + command: "{{ drush_path }} -y config-set search_api.server.default_solr_server backend_config.connector_config.core CLAW" args: chdir: "{{ drupal_core_path }}" register: set_search_api_config diff --git a/roles/internal/webserver-app/tasks/jwt.yml b/roles/internal/webserver-app/tasks/jwt.yml index 2177527a..bf7c06e7 100644 --- a/roles/internal/webserver-app/tasks/jwt.yml +++ b/roles/internal/webserver-app/tasks/jwt.yml @@ -8,7 +8,7 @@ group: "{{ webserver_app_user }}" - name: Get SSL keys - include_role: + include_role: name: Islandora-Devops.keymaster vars: ssl_key_private_output_path: "{{ webserver_app_jwt_key_path }}/private.key" @@ -32,7 +32,7 @@ register: drupal_jwt_config - name: Import JWT Config Into Drupal - command: drush config-import -y --partial --source="{{ webserver_app_jwt_config_path }}" + command: "{{ drush_path }} config-import -y --partial --source={{ webserver_app_jwt_config_path }}" args: chdir: "{{ drupal_core_path }}" when: drupal_jwt_config.changed is defined and drupal_jwt_config.changed From 4001cc1f51079b56ba0453e22d2dfe0107a96d98 Mon Sep 17 00:00:00 2001 From: Seth Shaw Date: Fri, 19 Jan 2018 10:36:30 -0800 Subject: [PATCH 2/2] Change webserver_app_user based on OS --- roles/internal/webserver-app/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/internal/webserver-app/defaults/main.yml b/roles/internal/webserver-app/defaults/main.yml index 74cf3be1..3da3566f 100644 --- a/roles/internal/webserver-app/defaults/main.yml +++ b/roles/internal/webserver-app/defaults/main.yml @@ -9,7 +9,7 @@ webserver_app_jwt_config_path: /opt/islandora/configs/jwt webserver_app_drupal_config_path: /opt/islandora/configs/drupal -webserver_app_user: ubuntu +webserver_app_user: "{% if ansible_os_family == 'RedHat' %}apache{% else %}www-data{% endif %}" solr_user: solr solr_instance_conf_path: /var/solr/data/CLAW/conf