add nitter-systemd role and enable it in site.yml
This commit is contained in:
parent
e2b3e248c9
commit
004b9c262d
|
@ -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
|
|
@ -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
|
Loading…
Reference in New Issue