- name: Run foreman export
sudo: False
shell: bash -lc "rm -rf /tmp/foreman && cd {{ rails.directory }} && bundle exec foreman export upstart /tmp/foreman -a {{ nginx.vhost|lower|replace(".", "_")|replace("*", "_") }} -u deploy -e .env.production && sudo mv /tmp/foreman/* /etc/init"
environment: rails.environment_variables
- name: (Re)Start process
service: name="{{ nginx.vhost|lower|replace(".", "_")|replace("*", "_") }}" state=restarted