add nitter-systemd role and enable it in site.yml

This commit is contained in:
staticsafe 2021-09-11 13:19:29 -04:00
parent e2b3e248c9
commit 004b9c262d
3 changed files with 36 additions and 1 deletions

View File

@ -0,0 +1,14 @@
---
# This role templates the systemd service file for the nitter service and
# then enables it
- name: Template and copy nitter.service
ansible.builtin.template:
src: nitter.service
dest: /etc/systemd/system/nitter.service
- name: Enable nitter service
ansible.builtin.systemd:
name: nitter
state: started
enabled: yes
daemon_reload: yes

View File

@ -0,0 +1,21 @@
[Unit]
Description=Nitter (An alternative Twitter front-end)
After=syslog.target
After=network.target
[Service]
Type=simple
# set user and group
User={{ NITTER_USER }}
Group={{ NITTER_USER }}
# configure location
WorkingDirectory=/home/{{ NITTER_USER }}/nitter
ExecStart=/home/{{ NITTER_USER }}/nitter/nitter
Restart=always
RestartSec=15
[Install]
WantedBy=multi-user.target

View File

@ -6,5 +6,5 @@
- nim - nim
- nitter-app - nitter-app
- nitter-config - nitter-config
# - nitter-systemd - nitter-systemd
# - nitter-nginx # - nitter-nginx