Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---
- - name: Install packages
- command: yarn install
- - name: "Install forever"
- npm: name=forever global=yes state=present
- - name: "Check list of Node.js apps running"
- command: forever list
- register: forever_list
- changed_when: false
- - name: "Start your node app"
- command: forever start PROJECT_PATH/index.js
- when: "forever_list.stdout.find('PROJECT_PATH/index.js') == -1"
Add Comment
Please, Sign In to add comment