You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
761 B
36 lines
761 B
3 years ago
|
---
|
||
|
- name: uptime_kuma | add_user | Ensure kuma group exists
|
||
|
group:
|
||
|
name: "{{ kuma__group }}"
|
||
|
state: present
|
||
|
|
||
|
- name: uptime_kuma | add_user | Add kuma user
|
||
|
user:
|
||
|
name: "{{ kuma__user }}"
|
||
|
group: "{{ kuma__group }}"
|
||
|
state: present
|
||
|
create_home: yes
|
||
|
shell: /bin/bash
|
||
|
become: yes
|
||
|
|
||
|
- name: kuma | Clone kuma repo
|
||
|
git:
|
||
|
repo: "{{ kuma__repo }}"
|
||
|
dest: "{{ kuma__path }}"
|
||
|
owner: "{{ kuma__user }}"
|
||
|
group: "{{ kuma__group }}"
|
||
|
become: yes
|
||
|
|
||
|
- name: kuma | Install package dependencies
|
||
|
npm:
|
||
|
path: "{{ kuma__path }}"
|
||
|
state: present
|
||
|
become_user: "{{ kuma__user }}"
|
||
|
|
||
|
- name: kuma | Install pm2
|
||
|
npm:
|
||
|
name: pm2
|
||
|
state: present
|
||
|
path: "{{ kuma__path }}"
|
||
|
become: yes
|
||
|
become_user: "{{ kuma__user }}"
|