Page MenuHomeDevCentral

D2887.diff
No OneTemporary

D2887.diff

diff --git a/roles/devserver/userland-software/dev.sls b/roles/devserver/userland-software/dev.sls
--- a/roles/devserver/userland-software/dev.sls
+++ b/roles/devserver/userland-software/dev.sls
@@ -221,6 +221,15 @@
- pkgs:
- git-review
+# -------------------------------------------------------------
+# Nasqueron development and operations
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+{{ dirs.bin }}/create-vault-approle:
+ file.managed:
+ - source: salt://roles/devserver/userland-software/files/create-vault-approle.py
+ - mode: 755
+
# -------------------------------------------------------------
# MediaWiki development
#
diff --git a/roles/devserver/userland-software/files/create-vault-approle.sh b/roles/devserver/userland-software/files/create-vault-approle.sh
new file mode 100755
--- /dev/null
+++ b/roles/devserver/userland-software/files/create-vault-approle.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+VAULT_POLICY=$1
+
+vault write "auth/approle/role/$VAULT_POLICY" token_policies="$VAULT_POLICY" \
+ token_ttl=1h token_max_ttl=4h
+
+vault read "auth/approle/role/$VAULT_POLICY/role-id"
+vault write -force "auth/approle/role/$VAULT_POLICY/secret-id"

File Metadata

Mime Type
text/plain
Expires
Fri, Jan 31, 20:08 (17 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2388434
Default Alt Text
D2887.diff (1 KB)

Event Timeline