Page MenuHomeDevCentral

D1527.id3900.diff
No OneTemporary

D1527.id3900.diff

diff --git a/GIDs b/GIDs
--- a/GIDs
+++ b/GIDs
@@ -1,6 +1,7 @@
827 chaton-dev
828 deployment
829 nasqueron-irc
+990 quassel
3001 ops
#3002 is intentionally left unassigned
3003 deployment
diff --git a/UIDs b/UIDs
--- a/UIDs
+++ b/UIDs
@@ -3,6 +3,7 @@
832 chaton
833 viper
834 tc2
+990 quassel
3004 mediawiki
9001 salt
9002 deploy
diff --git a/map.jinja b/map.jinja
--- a/map.jinja
+++ b/map.jinja
@@ -32,15 +32,24 @@
'Debian': {
'bash': '/bin/bash',
'fish': '/usr/bin/fish',
+ 'nologin': '/usr/sbin/nologin',
'tcsh': '/usr/bin/tcsh',
'zsh': '/bin/zsh',
},
'FreeBSD' : {
'bash': '/usr/local/bin/bash',
'fish': '/usr/local/bin/fish',
+ 'nologin': '/sbin/nologin',
'tcsh': '/bin/tcsh',
'zsh': '/usr/local/bin/zsh',
},
+ 'Arch': {
+ 'bash': '/bin/bash',
+ 'fish': '/usr/bin/fish',
+ 'nologin': '/sbin/nologin',
+ 'tcsh': '/usr/bin/tcsh',
+ 'zsh': '/bin/zsh',
+ },
}, default='Debian') %}
{% set paths = salt['grains.filter_by']({
diff --git a/roles/shellserver/init.sls b/roles/shellserver/init.sls
--- a/roles/shellserver/init.sls
+++ b/roles/shellserver/init.sls
@@ -11,6 +11,7 @@
- .vhosts
- .web-hosting
- .database
+ - .quassel-core
# Services hosted
- .odderon
diff --git a/roles/shellserver/quassel-core/account.sls b/roles/shellserver/quassel-core/account.sls
new file mode 100644
--- /dev/null
+++ b/roles/shellserver/quassel-core/account.sls
@@ -0,0 +1,26 @@
+# -------------------------------------------------------------
+# Salt — Provision Quassel core
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Eglide
+# Created: 2018-03-28
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+{% from "map.jinja" import shells with context %}
+
+# -------------------------------------------------------------
+# Account
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+quassel_account:
+ group.present:
+ - name: quassel
+ - gid: 990
+ - system: True
+ user.present:
+ - name: quassel
+ - fullname: Quassel core
+ - uid: 990
+ - gid: 990
+ - home: /var/lib/quassel
+ - shell: {{ shells.nologin }}
diff --git a/roles/shellserver/quassel-core/certificate.sls b/roles/shellserver/quassel-core/certificate.sls
new file mode 100644
--- /dev/null
+++ b/roles/shellserver/quassel-core/certificate.sls
@@ -0,0 +1,30 @@
+# -------------------------------------------------------------
+# Salt — Provision Quassel core
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Eglide
+# Created: 2018-03-28
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+# -------------------------------------------------------------
+# Certificate
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+/var/lib/quassel:
+ file.directory:
+ - user: quassel
+ - group: quassel
+
+quassel_certificate:
+ cmd.run:
+ - name: cat privkey.pem cert.pem > /var/lib/quassel/quasselCert.pem
+ - cwd: /etc/letsencrypt/live/quassel.eglide.org
+ - creates: /var/lib/quassel/quasselCert.pem
+
+quassel_certificate_rights:
+ file.managed:
+ - name: /var/lib/quassel/quasselCert.pem
+ - replace: False
+ - user: quassel
+ - group: quassel
+ - mode: 400
diff --git a/roles/shellserver/init.sls b/roles/shellserver/quassel-core/init.sls
copy from roles/shellserver/init.sls
copy to roles/shellserver/quassel-core/init.sls
--- a/roles/shellserver/init.sls
+++ b/roles/shellserver/quassel-core/init.sls
@@ -1,17 +1,12 @@
# -------------------------------------------------------------
-# Salt — Shell server's units
+# Salt — Provision Quassel core
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-# Project: Nasqueron
+# Project: Eglide
+# Created: 2018-03-28
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
include:
- # System features
- - .userland-software
- - .vhosts
- - .web-hosting
- - .database
-
- # Services hosted
- - .odderon
- - .bonjour-chaton
+ - .account
+ - .certificate
+ - .software
diff --git a/roles/shellserver/quassel-core/software.sls b/roles/shellserver/quassel-core/software.sls
new file mode 100644
--- /dev/null
+++ b/roles/shellserver/quassel-core/software.sls
@@ -0,0 +1,23 @@
+# -------------------------------------------------------------
+# Salt — Provision Quassel core
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Eglide
+# Created: 2018-03-28
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+# -------------------------------------------------------------
+# Software
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+quassel-core:
+ pkg.installed
+
+# -------------------------------------------------------------
+# Dependencies
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+{% if grains['os_family'] == 'Debian' %}
+libqt5sql5-psql:
+ pkg.installed
+{% endif %}

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 26, 05:58 (20 h, 14 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2264075
Default Alt Text
D1527.id3900.diff (5 KB)

Event Timeline