Skip to content

Commit

Permalink
Drupal & JWT fixes for CentOS (#49)
Browse files Browse the repository at this point in the history
* Update drush to use drush_path

* Change webserver_app_user based on OS
  • Loading branch information
seth-shaw-unlv authored and whikloj committed Jan 30, 2018
1 parent dfd6dff commit d23f819
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion roles/internal/webserver-app/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 5 additions & 5 deletions roles/internal/webserver-app/tasks/drupal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@
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
changed_when: false
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"
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions roles/internal/webserver-app/tasks/jwt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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

0 comments on commit d23f819

Please sign in to comment.