Sorry, here's some more information:
Playbook: deploy.yml
---
- hosts: webservers
user: ubuntu
sudo: True
vars:
app_name: app
repo_url: https://github.com/my_git/App.git
repo_remote: origin
repo_version: master
webapps_dir: /srv/webapps
wsgi_file: wsgi.py
wsgi_callable: app
tasks:
- name: ensure log directory
action: file dest=${webapps_dir}/${app_name}/log state=directory
- name: deploy code from repository
action: git repo=$repo_url dest=${webapps_dir}/${app_name}/src
remote=$repo_remote version=$repo_version
- name: install dependencies into virtualenv
action: pip
requirements=${webapps_dir}/${app_name}/src/requirements.txt
virtualenv=${webapps_dir}/${app_name}/venv state=present
- name: create supervisor program config
action: template src=templates/supervisor.ini
dest=/etc/supervisor/${app_name}.ini
notify:
- restart app
- name: create nginx site config
action: template src=templates/nginx_site.conf
dest=/etc/nginx/sites-available/${app_name}.conf
notify:
- restart nginx
- name: link nginx config
action: file src=/etc/nginx/sites-available/${app_name}.conf
dest=/etc/nginx/sites-enabled/${app_name}.conf state=link
- name: start app
action: supervisorctl name=${app_name} state=started
handlers:
- name: restart app
action: supervisorctl name=${app_name} state=restarted
- name: restart nginx
action: service name=nginx state=restarted
And here is the command I run to start the deploy.yml:
ansible-playbook App/devops/deploy.yml -i App/devops/hosts
--private-key=/home/username/private_key.pem
On Wednesday, February 12, 2014 6:58:37 PM UTC-5, Alex Chumbley wrote:
>
> Whenever I try to deploy my app using ansible-playbook, it fails on start
> app since it says "ERROR (no such process)".
>
> Can't understand why this is happening. Anyone know good docs on this
> stuff or know the answer?
>
--
You received this message because you are subscribed to the Google Groups
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.