Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F13143578
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
View Options
diff --git a/roles/devserver/userland-home/cron.sls b/roles/devserver/userland-home/cron.sls
new file mode 100644
index 0000000..bb8802e
--- /dev/null
+++ b/roles/devserver/userland-home/cron.sls
@@ -0,0 +1,36 @@
+#!py
+
+# -------------------------------------------------------------
+# Salt — Provision user content
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# License: Trivial work, not eligible to copyright
+# -------------------------------------------------------------
+
+
+def get_cron_path(user):
+ """Get source cron path in operations repository."""
+ return f"roles/devserver/userland-home/files/_crons/{user}"
+
+
+def has_crontab(user):
+ return salt["slsutil.file_exists"](get_cron_path(user))
+
+
+def build_cron_file(user):
+ cron_source_path = get_cron_path(user)
+
+ return {
+ "cron.file": [
+ {"name": f"salt://{cron_source_path}"},
+ {"user": user},
+ ]
+ }
+
+
+def run():
+ return {
+ f"devserver_crontab_{user}": build_cron_file(user)
+ for user in salt["forest.get_users"]()
+ if has_crontab(user)
+ }
diff --git a/roles/devserver/userland-home/files/_crons/dereckson b/roles/devserver/userland-home/files/_crons/dereckson
new file mode 100644
index 0000000..496aac6
--- /dev/null
+++ b/roles/devserver/userland-home/files/_crons/dereckson
@@ -0,0 +1,25 @@
+
+# -------------------------------------------------------------
+# Cron :: dereckson
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# License: Trivial work, not eligible to copyright
+# Source file: roles/devserver/userland-home/files/_crons/dereckson
+# -------------------------------------------------------------
+#
+# <auto-generated>
+# This file is managed by our rOPS SaltStack repository.
+#
+# Changes to this file may cause incorrect behavior
+# and will be lost if the state is redeployed.
+# </auto-generated>
+
+HOME=/home/dereckson
+PATH=/bin:/usr/bin:/usr/games:/usr/local/bin:$HOME/bin
+LANG=en_US.UTF-8
+
+# -------------------------------------------------------------
+# Events
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+@reboot ssh-agent -c | grep -v echo > $HOME/bin/ssh-agent-session
diff --git a/roles/devserver/userland-home/init.sls b/roles/devserver/userland-home/init.sls
index 4677618..c2ca8a3 100644
--- a/roles/devserver/userland-home/init.sls
+++ b/roles/devserver/userland-home/init.sls
@@ -1,11 +1,12 @@
# -------------------------------------------------------------
# Salt — Provision user content
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Project: Nasqueron
# Created: 2018-03-08
# License: Trivial work, not eligible to copyright
# -------------------------------------------------------------
include:
- .homefiles
- .repos
+ - .cron
File Metadata
Details
Attached
Mime Type
text/x-diff
Expires
Fri, Nov 21, 16:42 (1 d, 13 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3188603
Default Alt Text
(2 KB)
Attached To
Mode
rOPS Nasqueron Operations
Attached
Detach File
Event Timeline
Log In to Comment