Commit e6b18aa3 authored by Dennis Baurichter's avatar Dennis Baurichter
Browse files

Add klausurtool role on new fsmi-klausurarchiv host

parent 6dfd22a9
---
pull_groups:
- server
- irb
- vm
network:
enp11s0:
dhcp: true
ipv4: 131.234.28.74/22
ipv6: 2001:638:502:28:250:56ff:feb8:49fa/64
firewall:
ports:
tcp:
- 8080
- 8081
- 22022
......@@ -312,3 +312,9 @@
address: "::1/128"
method: "scram-sha-256"
- role: synapse
- name: configure fsmi-klausurarchiv
hosts: fsmi-klausurarchiv
roles:
- role: klausurtool
[Unit]
Description=Klausurtool documentation web service
After=klausurarchiv.mount
Requires=klausurarchiv.mount
[Service]
User=fsmi
# /bin/sh is required because systemd might complain otherwise about not being able to find /klausurarchiv/...
# This is because systemd itself runs as root, but the NFS server may have root mapping disabled.
ExecStart=/bin/sh -c "/klausurarchiv/bin/fsmi-docserve"
[Install]
WantedBy=multi-user.target
[Unit]
Description=Klausurtool web interface
After=klausurarchiv.mount
Requires=klausurarchiv.mount
[Service]
User=fsmi
# /bin/sh is required because systemd might complain otherwise about not being able to find /klausurarchiv/...
# This is because systemd itself runs as root, but the NFS server may have root mapping disabled.
ExecStart=/bin/sh -c "/klausurarchiv/bin/fsmi-htserve"
[Install]
WantedBy=multi-user.target
---
- name: install prerequisites for klausurtool
package:
name:
- nfs-utils
- python-cherrypy
- python-mako
- name: create /etc/fstab entry and mount /klausurarchiv
mount:
src: "fsmi-monster.upb.de:/mnt/storage/klausurarchiv"
path: "/klausurarchiv/"
fstype: "nfs"
opts: "vers=3,proto=tcp,_netdev"
state: mounted
- name: add klausurarchiv group
group:
name: "klausurarchiv"
gid: 5000
- name: add fsmi user
user:
name: "fsmi"
group: "klausurarchiv"
- name: install klausurtool services
copy:
src: "{{ item }}"
dest: "/etc/systemd/system/{{ item }}"
owner: root
group: root
mode: '0644'
loop:
- "klausurtool-web.service"
- "klausurtool-doc.service"
- name: enable klausurtool services
service:
name: "{{ item }}"
state: "started"
enabled: yes
loop:
- "klausurtool-web.service"
- "klausurtool-doc.service"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment