From: Andreas Gerler Date: Sun, 16 Jul 2023 08:15:30 +0000 (+0200) Subject: default-cfbs.json X-Git-Url: http://git.bundesbrandschatzamt.de/?a=commitdiff_plain;h=2f5bd82ddc5ce4f7da443ce75446b7dad70e6aa2;p=emacsconfig.git default-cfbs.json for CFngine cfbs --- diff --git a/bba.org b/bba.org index d5b375af..e7c8abeb 100644 --- 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 index 00000000..5edd5a8a --- /dev/null +++ b/templates/default-cfbs.json @@ -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" + ] + } + } +}