Skip to content

Commit

Permalink
Set .env file to app user permissions and add DRUPAL_SITE_HOST_PROVID…
Browse files Browse the repository at this point in the history
…ER to .env
  • Loading branch information
jonpugh committed Sep 20, 2023
1 parent 2200637 commit c62f31f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 2 additions & 0 deletions roles/app/defaults/drupal.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
---

devshop_app_drupal_site_hosting_environment: "DevShop Platform"

# Template file to use for settings file.
devshop_app_drupal_create_settings_file: true
devshop_app_drupal_settings_include_template: "drupal.settings.devshop.php.j2"
Expand Down
8 changes: 5 additions & 3 deletions roles/app/tasks/drupal.post-git.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
- name: Prepare .env file.
file:
path: "{{ devshop_app_env_file_path }}"
owner: "{{ devshop_app_user }}"
group: "{{ devshop_app_user }}"
state: touch
become: false

- name: Write service variables to .env file.
blockinfile:
Expand All @@ -19,9 +20,10 @@
MYSQL_HOSTNAME="{{ devshop_service_db_host }}"
MYSQL_PORT="{{ devshop_service_db_port }}"
DRUSH_OPTIONS_URI="{{ ansible_host }}"
## END ansible_managed.
become: false
## Used by site.module for the "Host Provider" property.
DRUPAL_SITE_HOST_PROVIDER="{{ devshop_app_drupal_site_host_provider }}"
## END ansible_managed.
when:
- devshop_service_db_name | default(false)

Expand Down

0 comments on commit c62f31f

Please sign in to comment.