diff options
Diffstat (limited to 'playbooks/roles/ci/templates/volumes/laminar/scripts')
-rwxr-xr-x | playbooks/roles/ci/templates/volumes/laminar/scripts/get_secret | 35 | ||||
-rwxr-xr-x | playbooks/roles/ci/templates/volumes/laminar/scripts/log | 3 |
2 files changed, 0 insertions, 38 deletions
diff --git a/playbooks/roles/ci/templates/volumes/laminar/scripts/get_secret b/playbooks/roles/ci/templates/volumes/laminar/scripts/get_secret deleted file mode 100755 index 2774651..0000000 --- a/playbooks/roles/ci/templates/volumes/laminar/scripts/get_secret +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/bash - -bw config server "https://{{ passwd_domain }}" -bw login --apikey --quiet -bw unlock --passwordenv BW_PASSWORD --quiet - -# https://github.com/bitwarden/clients/issues/3366 -function bw_get() { - local pwd - local count - local organisation=${2:-notnull} - - count=$(bw list items --pretty --organizationid ${organisation} | jq -r '[.[] | select(.name=="'$1'")] | length') - - if [[ "$count" -gt 1 ]]; then - echo "Multiple items found" - return 1 - fi - - if [[ "$count" -lt 1 ]]; then - echo "No items found" - return 1 - fi - - pwd=$(bw list items --pretty --organizationid ${organisation} | jq -r '.[] | select(.name=="'$1'")') - if [[ -z "$pwd" ]]; then - echo "Password not found" - return 1 - fi - - echo "$pwd" -} - -bw_get $@ -bw --quiet lock diff --git a/playbooks/roles/ci/templates/volumes/laminar/scripts/log b/playbooks/roles/ci/templates/volumes/laminar/scripts/log deleted file mode 100755 index 180fa33..0000000 --- a/playbooks/roles/ci/templates/volumes/laminar/scripts/log +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -echo `date +"%d-%m-%Y %H:%M:%S"` " - " "${@}" |