Skip to content

Commit

Permalink
add DOMAIN_CURRENT_SITE to .env (#760)
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanielks authored and swalkinshaw committed Feb 15, 2017
1 parent c4082dd commit 5f5b926
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
### HEAD
* Add DOMAIN_CURRENT_SITE to default env variables ([#760](https://github.com/roots/trellis/pull/760))
* Fix formatting of `set_fact` for `ansible_become_pass` ([#758](https://github.com/roots/trellis/pull/758))
* Require Ansible 2.2.0.0 or greater ([#726](https://github.com/roots/trellis/pull/726))
* [BREAKING] Use more secure sshd defaults ([#744](https://github.com/roots/trellis/pull/744))
Expand Down
1 change: 1 addition & 0 deletions deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
wp_env: "{{ env }}"
wp_home: "{{ project.ssl.enabled | default(false) | ternary('https', 'http') }}://{{ project.site_hosts | map(attribute='canonical') | first }}"
wp_siteurl: "{{ project.ssl.enabled | default(false) | ternary('https', 'http') }}://{{ project.site_hosts | map(attribute='canonical') | first }}/wp"
domain_current_site: "{{ project.site_hosts | map(attribute='canonical') | first }}"
site_env: "{{ wordpress_env_defaults | combine(project.env | default({}), vault_wordpress_sites[site].env) }}"
project_local_path: "{{ (lookup('env', 'USER') == 'vagrant') | ternary(project_root + '/' + project_current_path, project.local_path) }}"

Expand Down
1 change: 1 addition & 0 deletions group_vars/all/helpers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ wordpress_env_defaults:
wp_env: "{{ env }}"
wp_home: "{{ ssl_enabled | ternary('https', 'http') }}://{{ site_hosts_canonical | first }}"
wp_siteurl: "{{ ssl_enabled | ternary('https', 'http') }}://{{ site_hosts_canonical | first }}/wp"
domain_current_site: "{{ site_hosts_canonical | first }}"

site_env: "{{ wordpress_env_defaults | combine(item.value.env | default({}), vault_wordpress_sites[item.key].env) }}"
site_hosts_canonical: "{{ item.value.site_hosts | map(attribute='canonical') | list }}"
Expand Down

0 comments on commit 5f5b926

Please sign in to comment.