Do not run ansible-upstart

24 views
Skip to first unread message

Fernando Cagale

unread,
Apr 25, 2016, 12:08:22 PM4/25/16
to Ansible Project
Hello

I'm doing a test with ansible using the "upstart", but is not run "upstart exec path".

Below example api.yml.

Does anyone have any idea why you're not running?

He did not start my Node.js API.

{{app_path}} = /var/app/cart
{{app_bin}} = index.js
{{http_host}} = 127.0.0.1
{{http_port}} = 3000


- hosts: api
remote_user: root
roles:
- role: franklinkim.environment
- role: nodesource.node
- role: node
- role: telusdigital.upstart
upstart_name: "{{app_name}}"
upstart_start_on:
- started networking
upstart_stop_on:
- stopping networking
upstart_respawn: yes
upstart_respawn_limit: yes
upstart_respawn_limit_count: 5
upstart_respawn_limit_interval: 20
upstart_user: "{{deploy_user}}"
upstart_group: "{{deploy_group}}"
upstart_exec_path: "/usr/bin/node {{app_path}}/{{app_bin}}"
upstart_exec_flags:
- "chdir={{app_path}}"
upstart_environment_global: no
upstart_environment:
- {name: NODE_ENV, value: production}
- {name: SERVER_PORT, value: "{{http_port}}"}
- role: geerlingguy.haproxy
haproxy_backend_servers:
- name: "{{app_name}}"
address: "{{http_host}}:{{http_port}}"
- haproxy
Reply all
Reply to author
Forward
0 new messages