(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])
--- /dev/null
+{
+ "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"
+ ]
+ }
+ }
+}