Skip to content

Commit

Permalink
Merge pull request #647 from roots/improve-wp-home-site-url-variables
Browse files Browse the repository at this point in the history
WP 4.6 Compat: set WP_HOME/SITEURL directly
  • Loading branch information
swalkinshaw authored Sep 2, 2016
2 parents c178ab9 + 4fa64a3 commit f15444b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ Vagrant.configure('2') do |config|
'development' => ['default']
}

if tags = ENV['ANSIBLE_TAGS']
ansible.tags = tags
end

ansible.extra_vars = {'vagrant_version' => Vagrant::VERSION}
if vars = ENV['ANSIBLE_VARS']
extra_vars = Hash[vars.split(',').map { |pair| pair.split('=') }]
Expand Down
4 changes: 2 additions & 2 deletions group_vars/all/helpers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ wordpress_env_defaults:
db_user: "{{ item.key | underscore }}"
disable_wp_cron: true
wp_env: "{{ env }}"
wp_home: "{{ item.value.ssl.enabled | default(false) | ternary('https', 'http') }}://${HTTP_HOST}"
wp_siteurl: "${WP_HOME}/wp"
wp_home: "{{ item.value.ssl.enabled | default(false) | ternary('https', 'http') }}://{{ site_hosts_canonical | first }}"
wp_siteurl: "{{ item.value.ssl.enabled | default(false) | ternary('https', 'http') }}://{{ site_hosts_canonical | first }}/wp"

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 f15444b

Please sign in to comment.