Bedrock-ansible -Staging/production Wordpress install not in publicly viewable directory

Hello Guys
Thanks to all your help I’ve managed to get up and running with a development environment with bedrock-ansible and Vagrant -which is great and now Im trying to use bedrock-ansible to set up a staging site on digital ocean. Having the site viewable by the outside world will be mean I am really cooking with gas.

My question

My question is how do you get WordPress to be viewable to by everyong using bedrock-ansible?

On my remote machine, when i look at it through the browser I now see what is in

 /var/www/html

Its the default message: ‘Welcome to nginx on Debian!
If you see this page, the nginx web server is successfully installed and working on Debian. Further configuration is required.’

However my WordPress install seems to be in

/srv/www/ironing.blog/current/web/

What I did to get this far

In my local machine I edited
group_vars/staging as below(dont worry i’ll change the passwords when i get up and running)

mysql_root_password: stagingpw

wordpress_sites:
  - site_name:  ironing.blog
    site_hosts:
      
      - 178.62.124.57
    user: deploy
    group: www-data
    site_install: true
    site_title: ihi blog
    admin_user: admin
    admin_password: admin
    admin_email: *********@****.com
    system_cron: true
    multisite:
      enabled: false
    env:
      wp_home: 178.62.124.57
      wp_siteurl: 178.62.124.57/wp
      wp_env: staging
      db_name: example_staging
      db_user: example_dbuser
      db_password: example_dbpassword

and on my local machine i edited hosts/staging

[web]
178.62.124.57	

[staging:children]
web

and in site.yml I had to change the

 `remote_user` 

to root because I only have root set up on the fresh server.

I then ran

ansible-playbook -i hosts/staging site.yml

And it started doing its stuff which is really nice.

The lasts 2 Tasks in Ansible have error messages are in red.

TASK: [wordpress-sites | WP installed?] *************************************** 
has red text output and the following message at then end:
stderr: Error: This does not seem to be a WordPress install.
Pass --path=`path/to/wordpress` or run `wp core download

`.
and

TASK: [wordpress-sites | Install WP] ****************************************** 
has red text output and the following message at then end:
stderr: Error: This does not seem to be a WordPress install.
Pass --path=`path/to/wordpress` or run `wp core download`.

FATAL: all hosts have already failed -- aborting

at the bottom it says

PLAY RECAP ******************************************************************** 
           to retry, use: --limit @/home/jimmyhp/site.retry

178.62.124.57              : ok=62   changed=7    unreachable=0    failed=1   

Do I need to change the ansible set up and what file would I change and what would I change it to?

wp_siteurl: 178.62.124.57/wp is wrong
i removed the /wp at the end

Just about to delete the server and try the install again.

OK I can get to Wordpress by tweaking the

/etc/nginx/sites-enabled/

file. and updateing root to the correct directory.

Would be nice if anyone has advice how to do this properly using ansible rather than doing stuff manually.

im also having to configure WordPress manually.

Are you using a stock Ubuntu 14.04 x64 image on Digital Ocean? bedrock-ansible is only designed to work with 14.04 right now.

yes that is what Im using.
Im just spinning up a 14.04 and running bedrock-ansible again.

Im biting my nails, and sitting on the edge of my seat!
Hope it works.

Just to clarify something: right now bedrock-ansible doesn’t work automatically 100% on a remote server. Running the default site.yml from start to finish (all roles) will fail by default on the two tasks you’re seeing. Those tasks to install WP rely on your project code being on the server. But right now with the playbook on a remote server there’s no way for that to happen.

It works with Vagrant because of the synced folder. Until we get a proper workflow going, you need to provision your remote server, then get the code onto the server somehow manually (scp, Capistrano, etc). And then install WP after that.

Hello swalkinshaw
Thanks very much for this clarification…
Thats very helpful…