ajout du role gotify
This commit is contained in:
parent
b146170467
commit
1c1993021b
50
roles/gotify/tasks/main.yml
Normal file
50
roles/gotify/tasks/main.yml
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
---
|
||||||
|
- name: Mise a jour apt cache
|
||||||
|
apt:
|
||||||
|
update_cache: yes
|
||||||
|
|
||||||
|
- name: Creation /etc/gotify
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: /etc/gotify
|
||||||
|
state: directory
|
||||||
|
mode: '0755'
|
||||||
|
|
||||||
|
- name: Creation /opt/gotify
|
||||||
|
ansible.builtin.file:
|
||||||
|
path: /opt/gotify
|
||||||
|
state: directory
|
||||||
|
mode: '0755'
|
||||||
|
|
||||||
|
- name: installation de gotify
|
||||||
|
get_url:
|
||||||
|
url: "https://github.com/gotify/server/releases/latest/download/gotify-linux-amd64.zip"
|
||||||
|
dest: "/tmp/gotify.zip"
|
||||||
|
|
||||||
|
- name: Extraction de Gotify
|
||||||
|
ansible.builtin.unarchive:
|
||||||
|
src: "/tmp/gotify.zip"
|
||||||
|
dest: "/opt/gotify"
|
||||||
|
become: yes
|
||||||
|
|
||||||
|
- name: Creation du fichier systemd
|
||||||
|
template:
|
||||||
|
src: "gotify.service.j2"
|
||||||
|
dest: "/etc/systemd/system/gotify.service"
|
||||||
|
become: yes
|
||||||
|
|
||||||
|
- name: Reload systemd
|
||||||
|
systemd:
|
||||||
|
daemon_reload: yes
|
||||||
|
|
||||||
|
- name: Creation du fichier conf gotify
|
||||||
|
template:
|
||||||
|
src: "config.yml.j2"
|
||||||
|
dest: "/etc/gotify/config.yml"
|
||||||
|
become: yes
|
||||||
|
|
||||||
|
- name: Demarage du gotify
|
||||||
|
systemd:
|
||||||
|
name: gotify
|
||||||
|
state: started
|
||||||
|
enabled: yes
|
||||||
|
|
4
roles/gotify/templates/config.yml.j2
Normal file
4
roles/gotify/templates/config.yml.j2
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
server:
|
||||||
|
keepaliveperiodseconds: 0
|
||||||
|
listenaddr: "" # the address to bind on, leave empty to bind on all addresses
|
||||||
|
port: 8008
|
13
roles/gotify/templates/gotify.service.j2
Normal file
13
roles/gotify/templates/gotify.service.j2
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=Gotify Server
|
||||||
|
After=network.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
User=root
|
||||||
|
ExecStart=/opt/gotify/gotify-linux-amd64
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
|
@ -7,6 +7,7 @@
|
|||||||
- goss
|
- goss
|
||||||
# - proxy3
|
# - proxy3
|
||||||
- zabbix-cli
|
- zabbix-cli
|
||||||
|
- gotify
|
||||||
# - ssh-cli
|
# - ssh-cli
|
||||||
# - syslog-cli
|
# - syslog-cli
|
||||||
- smb-backup
|
- smb-backup
|
||||||
|
Loading…
x
Reference in New Issue
Block a user