Skip to content

Commit

Permalink
Update vagrant.rb
Browse files Browse the repository at this point in the history
  • Loading branch information
MWDelaney authored Aug 28, 2024
1 parent 8a7c452 commit 95933ca
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/trellis/vagrant.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@ def post_up_message
msg << "\n* You can SSH into the machine with `vagrant ssh`."
msg << "\n* Then navigate to your WordPress sites at `/srv/www`"
msg << "\n or to your Trellis files at `#{ANSIBLE_PATH_ON_VM}`."
sites = YAML.load_file(File.join(ANSIBLE_PATH, 'group_vars/development/wordpress_sites.yml'))
wordpress_sites = sites['wordpress_sites']
if wordpress_sites.any?

trellis_config = Trellis::Config.new(root_path: ANSIBLE_PATH)
if trellis_config.wordpress_sites.any?
msg << "\n\n\e[35m🚀 Development URLs: \e[0m"
wordpress_sites.each do |site_name, site|
trellis_config.wordpress_sites.each do |site_name, site|
site_url = site['site_hosts'].first
site_url = site_url.is_a?(Hash) ? site_url['canonical'] : site_url
site_url = site['ssl']['enabled'] ? "https://#{site_url}" : "http://#{site_url}"
Expand Down

0 comments on commit 95933ca

Please sign in to comment.