lavenderguitar
3 years ago
1 changed files with 24 additions and 26 deletions
@ -1,31 +1,29 @@ |
|||||
--- |
--- |
||||
- name: kuma | Setup kuma |
- block: |
||||
command: npm run setup |
- name: kuma | Setup kuma |
||||
args: |
command: npm run setup |
||||
chdir: "{{ kuma__path }}" |
args: |
||||
become_user: "{{ kuma__user }}" |
chdir: "{{ kuma__path }}" |
||||
|
|
||||
- name: kuma | Clear all pm2 apps |
- name: kuma | Clear all pm2 apps |
||||
command: pm2 delete all |
command: pm2 delete all |
||||
args: |
args: |
||||
chdir: "{{ kuma__path }}" |
chdir: "{{ kuma__path }}" |
||||
become_user: "{{ kuma__user }}" |
|
||||
|
|
||||
- name: kuma | Create systemd startup script |
- name: kuma | Create systemd startup script |
||||
command: env PATH=$PATH:/usr/bin /usr/lib/node_modules/pm2/bin/pm2 startup systemd -u {{ kuma__user }} --hp /home/{{ kuma__user }} |
command: env PATH=$PATH:/usr/bin /usr/lib/node_modules/pm2/bin/pm2 startup systemd -u {{ kuma__user }} --hp /home/{{ kuma__user }} |
||||
args: |
args: |
||||
chdir: "{{ kuma__path }}" |
chdir: "{{ kuma__path }}" |
||||
become: yes |
become: yes |
||||
become_user: "{{ kuma__user }}" |
|
||||
|
|
||||
- name: kuma | Start kuma |
- name: kuma | Start kuma |
||||
command: pm2 start server/server.js --name kuma |
command: pm2 start server/server.js --name kuma |
||||
args: |
args: |
||||
chdir: "{{ kuma__path }}" |
chdir: "{{ kuma__path }}" |
||||
become_user: "{{ kuma__user }}" |
|
||||
|
|
||||
- name: kuma | Ensure pm2 startup configuration is enabled for reboots. |
- name: kuma | Ensure pm2 startup configuration is enabled for reboots. |
||||
command: pm2 save |
command: pm2 save |
||||
args: |
args: |
||||
chdir: "{{ kuma__path }}" |
chdir: "{{ kuma__path }}" |
||||
become_user: "{{ kuma__user }}" |
become_user: "{{ kuma__user }}" |
||||
|
become: yes |
Loading…
Reference in new issue