Page MenuHomeDevCentral

D857.id2180.diff
No OneTemporary

D857.id2180.diff

diff --git a/UIDs b/UIDs
new file mode 100644
--- /dev/null
+++ b/UIDs
@@ -0,0 +1 @@
+830 odderon
diff --git a/roles/shellserver/odderon/account.sls b/roles/shellserver/odderon/account.sls
new file mode 100644
--- /dev/null
+++ b/roles/shellserver/odderon/account.sls
@@ -0,0 +1,35 @@
+# -------------------------------------------------------------
+# Salt — Deploy Odderon (darkbot)
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Created: 2017-01-24
+# Description: Darkbot on Freenode
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+# -------------------------------------------------------------
+# Service account
+# -------------------------------------------------------------
+
+odderon_account:
+ user.present:
+ - name: odderon
+ - fullname: Odderon
+ - uid: 830
+ - gid: 829
+ - home: /opt/odderon
+
+# -------------------------------------------------------------
+# Sudo capabilities
+#
+# Members of nasqueron-irc should be able to sudo -u odderon …
+# -------------------------------------------------------------
+
+odderon_sudo_capabilities_file:
+ file.managed:
+ {% if grains['os'] == 'FreeBSD' %}
+ - name: /usr/local/etc/sudoers.d/odderon
+ {% else %}
+ - name: /etc/sudoers.d/odderon
+ {% endif %}
+ - source: salt://roles/shellserver/odderon/files/odderon.sudoers
diff --git a/roles/shellserver/odderon/files/odderon.sudoers b/roles/shellserver/odderon/files/odderon.sudoers
new file mode 100644
--- /dev/null
+++ b/roles/shellserver/odderon/files/odderon.sudoers
@@ -0,0 +1 @@
+%nasqueron-irc ALL=(odderon) NOPASSWD: ALL
diff --git a/roles/shellserver/odderon/init.sls b/roles/shellserver/odderon/init.sls
new file mode 100644
--- /dev/null
+++ b/roles/shellserver/odderon/init.sls
@@ -0,0 +1,10 @@
+# -------------------------------------------------------------
+# Salt — Deploy Odderon (darkbot)
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Created: 2017-01-25
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+include:
+ - .account
diff --git a/top.sls b/top.sls
--- a/top.sls
+++ b/top.sls
@@ -19,3 +19,4 @@
- roles/shellserver/eglide-website
- roles/shellserver/vhosts
- roles/shellserver/web-hosting
+ - roles/shellserver/odderon

File Metadata

Mime Type
text/plain
Expires
Fri, Dec 20, 03:57 (20 h, 37 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2307146
Default Alt Text
D857.id2180.diff (2 KB)

Event Timeline