Add docc helpers
Jes Olson jolson@digitalocean.com
Fri, 19 Nov 2021 12:06:26 -0600
2 files changed,
28 insertions(+),
0 deletions(-)
A
bin/docc-refresh
@@ -0,0 +1,14 @@
+#!/bin/sh + +app="$1" +contexts="bolt dash dust flux kiwi luca navy nova puff taro vega wolf" + +if [ -z "$app" ]; then + printf "%s\n" "app name required" + exit 1 +fi + +for i in $contexts; do + # vault login + docc --context "$i" update secret-sync -n chef "$app" --secret-auth token,$(cat ~/.vault-token) +done
A
bin/docc-restart
@@ -0,0 +1,14 @@
+#!/bin/sh + +app="$1" +contexts="bolt dash dust flux kiwi luca navy nova puff taro vega wolf" + +if [ -z "$app" ]; then + printf "%s\n" "app name required" + exit 1 +fi + +for i in $contexts; do + # vault login + docc --context "$i" -n chef restart "$app" +done