pgkehle.pm2

Ansible Role - PM2

This role installs and configures PM2 for a Node.js project.

You can find it on Ansible Galaxy: isaackehle.pm2

Variables

vars:
  flags:
    - init # Basic setup
    - processes # Set up Node processes to start when the system boots
    - upgrade # Update necessary packages

  deploy_dir: # Required to specify the main path

Examples

- hosts: all

  roles:
    - { role: isaackehle.pm2, flags: ["init"] }
    - { role: isaackehle.pm2, flags: ["processes"] }
    - { role: isaackehle.pm2, flags: ["upgrade"] }
export deploy="'deploy_dir': '/opt/servers/node'"

ansible-playbook playbooks/pm2.yml -e "{'flags': ['init'], ${deploy }}" -t init
ansible-playbook playbooks/pm2.yml -e "{'flags': ['configure'], ${deploy }}" -t processes
ansible-playbook playbooks/pm2.yml -e "{'flags': ['packages'], ${deploy }}" -t upgrade

Linting

yamllint -c yamllint.yaml .
ansible-lint .

License

MIT License

Author Information

Isaac Kehle @isaackehle (twitter, github, linkedin)

References

Informazioni sul progetto

Install and configure PM2 for a nodejs project

Installa
ansible-galaxy install pgkehle.pm2
Licenza
mit
Download
175
Proprietario