Skip to content
Snippets Groups Projects
Commit 1d531012 authored by Benjamin Graillot's avatar Benjamin Graillot Committed by Benjamin Graillot
Browse files

[linx] Add linx server, role and playbook

parent 555e9c37
No related branches found
No related tags found
1 merge request!206[linx] Add linx server, role and playbook
......@@ -38,6 +38,7 @@ nginx:
- {from: roundcube.crans.org, to: 172.16.10.107}
- {from: hedgedoc.crans.org, to: "172.16.10.128:3000"}
- {from: owncloud.crans.org, to: 172.16.10.136}
- {from: linx.crans.org, to: "172.16.10.119:8080"}
# - {from: belenios.crans.org, to: 172.16.10.111}
# - {from: mailman.crans.org, to: 10.231.136.180}
......
......@@ -148,6 +148,7 @@ jitsi.adm.crans.org
kenobi.adm.crans.org
kiwi.adm.crans.org
kiwijuice.adm.crans.org
linx.adm.crans.org
monitoring.adm.crans.org
owl.adm.crans.org
owncloud.adm.crans.org
......
#!/usr/bin/env ansible-playbook
---
- hosts: linx.adm.crans.org
vars:
linx:
ip: "{{ query('ldap', 'ip', 'linx', 'adm') }}"
siteurl: "https://linx.crans.org/"
roles:
- linx
---
- name: Restart linx-server
service:
name: linx-server
state: restarted
---
#- name: Install linx
- name: Create linx user
user:
create_home: yes
home: /var/lib/linx
system: yes
state: present
password: "!"
update_password: always
name: linx
- name: Create linx config dir
file:
path: /etc/linx
state: directory
- name: Deploy configuration file
template:
src: "linx/server.conf.j2"
dest: "/etc/linx/server.conf"
mode: 0644
- name: Install linx systemd unit
template:
src: "systemd/system/linx-server.service.j2"
dest: "/etc/systemd/system/linx-server.service"
mode: 0644
notify: Restart linx-server
- name: Load and activate linx systemd unit
systemd:
name: linx-server.service
daemon_reload: true
enabled: true
state: started
{{ ansible_header | comment }}
bind = {{ linx.ip }}:8080
sitename = CRANS Linx
siteurl = {{ linx.siteurl }}
maxsize = 10000000
maxexpiry = 604800
filespath = /var/lib/linx/files/
metapath = /var/lib/linx/meta/
{{ ansible_header | comment }}
[Unit]
Description=Linx
After=network.target
[Service]
Type=simple
User=linx
Group=linx
WorkingDirectory=/var/lib/linx/
ExecStart=/usr/local/sbin/linx-server -config /etc/linx/server.conf
Restart=always
[Install]
WantedBy=multi-user.target
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment