Page MenuHomeDevCentral

D1181.id3085.diff
No OneTemporary

D1181.id3085.diff

diff --git a/UIDs b/UIDs
--- a/UIDs
+++ b/UIDs
@@ -1,6 +1,8 @@
830 odderon
831 builder
832 chaton
+833 viper
+834 tc2
9001 salt
9002 deploy
8900 zr
diff --git a/pillar/top.sls b/pillar/top.sls
--- a/pillar/top.sls
+++ b/pillar/top.sls
@@ -17,3 +17,4 @@
ysul:
- paas-jails.jails
- webserver-legacy.sites
+ - viperserv.bots
diff --git a/pillar/viperserv/bots.sls b/pillar/viperserv/bots.sls
new file mode 100644
--- /dev/null
+++ b/pillar/viperserv/bots.sls
@@ -0,0 +1,42 @@
+# To regenerate the list of scripts in a folder, try:
+# find . -type f -name '*.tcl' | grep -v tests/ | grep -v Maintenance/ | grep -v ForUsers/ | grep -v PreSurfBoard | sed 's@\./@ - @'
+
+viperserv_accounts:
+ viperserv:
+ fullname: ViperServ
+ uid: 833
+ tc2:
+ fullname: Tau Ceti Central
+ uid: 834
+
+viperserv_bots:
+ Daeghrefn:
+ scripts:
+ - Core.tcl
+ - Tech.tcl
+ - Daeghrefn/Time.tcl
+ - Daeghrefn/Wolfplex.tcl
+ - Daeghrefn/Server.tcl
+ - Daeghrefn/Last.fm.tcl
+ - Daeghrefn/Wikimedia.tcl
+ - Daeghrefn/Bureautique.tcl
+ - Daeghrefn/oauth.tcl
+ - Daeghrefn/Communication.tcl
+ - Daeghrefn/GIS.tcl
+ - Daeghrefn/Tools.tcl
+ - Daeghrefn/Channel.tcl
+ - vendor/proxycheck.tcl
+ Wearg:
+ scripts:
+ - Core.tcl
+ - Tech.tcl
+ - Wearg/Broker.tcl
+ - Wearg/Time.tcl
+ - Wearg/Notifications.tcl
+ TC2:
+ runas: tc2
+ scripts:
+ - Core.tcl
+ - Tech.tcl
+ - TC2/Time.tcl
+ - TC2/Server.tcl
diff --git a/roles/viperserv/account/init.sls b/roles/viperserv/account/init.sls
new file mode 100644
--- /dev/null
+++ b/roles/viperserv/account/init.sls
@@ -0,0 +1,47 @@
+# -------------------------------------------------------------
+# Salt — Deploy ViperServ (eggdrop)
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Created: 2017-11-14
+# Description: Eggdrop on Freenode
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+{% from "map.jinja" import dirs with context %}
+
+# -------------------------------------------------------------
+# Service accounts
+# -------------------------------------------------------------
+
+{% for username, user in pillar['viperserv_accounts'].iteritems() %}
+
+viperserv_account_{{ username }}:
+ user.present:
+ - name: {{ username }}
+ - fullname: {{ user['fullname'] }}
+ - uid: {{ user['uid'] }}
+ - gid: nasqueron-irc
+ - home: /var/run/{{ username }}
+
+/var/run/{{ username }}:
+ file.directory:
+ - user: {{ user['uid'] }}
+ - group: nasqueron-irc
+ - dir_mode: 700
+
+{% endfor %}
+
+# -------------------------------------------------------------
+# Sudo capabilities
+#
+# Members of nasqueron-irc should be able to sudo -u viperserv …
+# -------------------------------------------------------------
+
+viperserv_sudo_capabilities_file:
+ file.managed:
+ - name: {{ dirs.etc }}/sudoers.d/viperserv
+ - source: salt://roles/viperserv/account/files/viperserv.sudoers
+ - template: jinja
+ - context:
+ accounts: {{ pillar['viperserv_accounts'].keys() }}
+ bots: {{ pillar['viperserv_bots'].keys() }}
diff --git a/pillar/top.sls b/roles/viperserv/eggdrop/init.sls
copy from pillar/top.sls
copy to roles/viperserv/eggdrop/init.sls
--- a/pillar/top.sls
+++ b/roles/viperserv/eggdrop/init.sls
@@ -1,19 +1,10 @@
# -------------------------------------------------------------
-# Salt configuration for Nasqueron servers
+# Salt — Deploy eggdrop park
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
-# Created: 2016-04-10
+# Created: 2017-11-05
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
-base:
- '*':
- - core.hostnames
- - core.users
- - core.groups
- - certificates.certificates
- - nodes.nodes
- - nodes.forests
- ysul:
- - paas-jails.jails
- - webserver-legacy.sites
+include:
+ - .software
diff --git a/roles/viperserv/eggdrop/software.sls b/roles/viperserv/eggdrop/software.sls
new file mode 100644
--- /dev/null
+++ b/roles/viperserv/eggdrop/software.sls
@@ -0,0 +1,50 @@
+# -------------------------------------------------------------
+# Salt — Deploy eggdrop park
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Created: 2017-11-05
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+{% from "map.jinja" import dirs with context %}
+
+# -------------------------------------------------------------
+# Build eggdrop
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+eggdrop_software:
+ file.directory:
+ - name: /opt/eggdrop
+ - user: builder
+ - group: deployment
+ cmd.run:
+ - name: install-eggdrop
+ - runas: builder
+ - env:
+ - DEST: /opt/eggdrop
+ - creates: /opt/eggdrop/eggdrop
+
+{{ dirs.bin }}/eggdrop:
+ file.symlink:
+ - target: /opt/eggdrop/eggdrop
+ - require:
+ - cmd: eggdrop_software
+
+# -------------------------------------------------------------
+# ViperServ directory
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+/srv/viperserv:
+ file.directory:
+ - user: viperserv
+ - group: nasqueron-irc
+ - dir_mode: 770
+
+viperserv_scripts:
+ git.latest:
+ - name: https://devcentral.nasqueron.org/source/viperserv.git
+ - target: /srv/viperserv/scripts
+ - update_head: False
+ - user: viperserv
+ - require:
+ - file: /srv/viperserv
diff --git a/roles/viperserv/init.sls b/roles/viperserv/init.sls
new file mode 100644
--- /dev/null
+++ b/roles/viperserv/init.sls
@@ -0,0 +1,20 @@
+# -------------------------------------------------------------
+# Salt — Deploy eggdrop park
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Created: 2017-11-05
+# License: Trivial work, not eligible to copyright
+# _ ___ _____
+# | | / (_)___ ___ _____/ ___/___ ______ __
+# | | / / / __ \/ _ \/ ___/\__ \/ _ \/ ___/ | / /
+# | |/ / / /_/ / __/ / ___/ / __/ / | |/ /
+# |___/_/ .___/\___/_/ /____/\___/_/ |___/
+# /_/
+#
+# [ 1993 technology for 2017 hackers ]
+#
+# -------------------------------------------------------------
+
+include:
+ - .account
+ - .eggdrop
diff --git a/top.sls b/top.sls
--- a/top.sls
+++ b/top.sls
@@ -23,6 +23,7 @@
- roles/paas-jails
- roles/dbserver-mysql
- roles/devserver
+ - roles/viperserv
- roles/webserver-core
- roles/webserver-legacy
- roles/webserver-varnish

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 24, 07:28 (14 h, 45 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2259423
Default Alt Text
D1181.id3085.diff (6 KB)

Event Timeline