Bedrock-ansible....and production?

Ansible at its most basic is just this:

ansible-playbook -i site.yml hosts

Which just means “run the site.yml playbook on the hosts file”. And a hosts file is pretty simple. You can see examples here: http://docs.ansible.com/intro_inventory.html

When using Vagrant with Ansible, it automatically creates a hosts file so you never really see that. So back to question #1:

  1. You can just create a hosts file with your production hostname/ip in there. group_vars/all will apply to all hosts as its name suggests. So you may want to rename that to group_vars/dev and make a new group_vars/prod with your production sites. Then your hosts file would look like:
[prod]
prod-server.com

And you would run ansible-playbook -i site.yml hosts as usual. You can always make a new playbook based on site.yml if you want to change what roles are run as well. Little more info here as well: Bedrock Vagrant/Ansible released

  1. Using this playbook on CentOS would require a lot more changes as it’s all set up to use apt and Ubuntu ppa’s.