So I’m getting ready to move my local development to a stage server. Last time I set the stage up manually as the playbook didn’t exist back then, now I wanna use Ansible as it’s much easier obviously.
I began with spinning up a 14.04 box on DigitalOcean and installed Ansible and Git. I then created the folder www
in /srv/
so that I have /srv/www/
where I cloned bedrock-ansible and my project repo so that I have them both in the same dir.
I went a head and followed the example in the notes from the bedrock repo staging example
Edit group_vars/staging
mysql_root_password: xxx
wordpress_sites:
- site_name: sub.domain.com/project
site_hosts:
- sub.domain.com/project
- x.x.x.x (my droplet ip)
user: deploy
group: www-data
site_install: true
site_title: Staging
admin_user: admin
admin_password: xxx
admin_email: admin@staging.example.com
system_cron: true
multisite:
enabled: false
env:
wp_home: http://sub.domain.com/project
wp_siteurl: http://sub.domain.com/project/wp
wp_env: staging
db_name: xxx
db_user: xxx
db_password: xxx
Edit hosts/staging
[web]
x.x.x.x (my droplet ip)
[staging:children]
web
Run ansible-playbook -i hosts/staging site.yml
PLAY [WordPress Server: Install LEMP Stack with PHP 5.6 and MariaDB MySQL] ****
GATHERING FACTS ***************************************************************
fatal: [x.x.x.x] => SSH encountered an unknown error during the connection. We recommend you re-run the command using -vvvv, which will enable SSH debugging output to help diagnose the issue
TASK: [common | Update Apt] ***************************************************
FATAL: no hosts matched or all hosts have already failed -- aborting
PLAY RECAP ********************************************************************
to retry, use: --limit @/root/site.retry
x.x.x.x : ok=0 changed=0 unreachable=1 failed=0
So what am I doing wrong? I also tried using 127.0.0.1 but to no avail.