-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for .env file in drupal (steamengine_drupal_env_template_…
…path)
- Loading branch information
Showing
2 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
|
||
- name: Remove potential env file | ||
file: | ||
state: absent | ||
path: "{{ steamengine_project_root_path_web }}/.env" | ||
when: steamengine_drupal_env_template_path is defined | ||
|
||
# Template module is used because copy module is not recommended with variables : https://docs.ansible.com/ansible/latest/collections/ansible/builtin/copy_module.html) | ||
- name: Create external env file | ||
template: | ||
src: "{{ steamengine_drupal_env_template_path }}" | ||
dest: "{{ steamengine_conf_path }}/.env" | ||
owner: "{{ steamengine_project_user }}" | ||
group: "{{ steamengine_app_user }}" | ||
mode: u=rw,g=r,o= | ||
when: steamengine_drupal_env_template_path is defined | ||
|
||
- name: Create env symlink | ||
file: | ||
state: link | ||
src: "{{ steamengine_conf_path }}/.env" | ||
dest: "{{ steamengine_project_root_path_web }}/.env" | ||
owner: "{{ steamengine_project_user }}" | ||
group: "{{ steamengine_app_user }}" | ||
when: steamengine_drupal_env_template_path is defined |