Open fonglh opened 9 years ago
@fonglh Had a similar issue with unicorn when provisioning on remote sites. In my setup I have two sets of config files, a site.yml
for Vagrant and and remote-site.yml
for production/staging. The main difference is the remote-site.yml
includes the deploy role, inserted just before webserver (see example below).
This at least ensures that the directories webserver needs are created - and I assume it's similar to what you are seeing for Puma, but does require a code deploy during the provision process. And it surfaces other issues.
I don't know Ansible very well, so this is all feels a bit hacky to me. If anyone with more knowledge can clue me in on what's the best approach that'd be appreciated.
- hosts: application
handlers:
- include: roles/delayed_job/handlers/main.yml
roles:
- base
- { role: ruby, tags: ruby }
- vim
- deploy
- webserver
Edit: My provision.sh
for staging/production looks a bit like this:
ansible-playbook $@ -s -u root -i inventory ../ansible/remote-site.yml
The directories don't seem to be created yet.