]> git.bundesbrandschatzamt.de Git - emacsconfig.git/commitdiff
default-cfbs.json
authorAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Sun, 16 Jul 2023 08:15:30 +0000 (10:15 +0200)
committerAndreas Gerler <baronNOSPAMbundesbrandschatzamt.de>
Sun, 16 Jul 2023 15:41:03 +0000 (17:41 +0200)
for CFngine cfbs

bba.org
templates/default-cfbs.json [new file with mode: 0644]

diff --git a/bba.org b/bba.org
index d5b375afc71baf2572b0a764ca9728c319ef51d1..e7c8abeb5b8a20cefac723eaebd4ab840c39e64f 100644 (file)
--- a/bba.org
+++ b/bba.org
@@ -542,6 +542,7 @@ snippets for =aws cli= are awesome!
   (defun ha-autoinsert-yas-expand()
     "Replace text in yasnippet template."
     (yas-expand-snippet (buffer-string) (point-min) (point-max)))
+  (define-auto-insert "cfbs.json$" ["default-cfbs.json" ha-autoinsert-yas-expand])
   (define-auto-insert "\\.go$" ["default-go.go" ha-autoinsert-yas-expand])
   (define-auto-insert "\\.sh$" ["default-sh.sh" ha-autoinsert-yas-expand])
   (define-auto-insert "\\.pl$" ["default-pl.pl" ha-autoinsert-yas-expand])
diff --git a/templates/default-cfbs.json b/templates/default-cfbs.json
new file mode 100644 (file)
index 0000000..5edd5a8
--- /dev/null
@@ -0,0 +1,16 @@
+{
+  "name": "${2:`(car (last (butlast (split-string (file-name-directory buffer-file-name) "/"))))`}",
+  "type": "module-repo",
+  "description": "Configure $2",
+  "provides": {
+    "vertica": {
+      "tags": ["local"],
+      "by": "${1:`(bba-insert-name)`}",
+      "steps": [
+        "copy $2 services/cfbs/site/$2",
+        "policy_files services/cfbs/site/$2/main.cf",
+        "bundles $2$0"
+      ]
+    }
+  }
+}