Skip to main content

Thorgate helper for ansible vault password

Project description

Thorgate Bitwarden password helper

Use with (for example) ansible vault to allow automatically getting password from bitwarden instead of copying it over.

Usage with ansible

Example ansible.cfg (considering you added tg-bw-helper with poetry):

[defaults]
vault_password_file=./ask-vault-pass.sh

ask-vault-pass.sh (needs to be executable):

#!/bin/sh
poetry run python -m tg_bw_helper --vault-item "Thorgate Ansible vault" --vault-entry-field "Main ansible"

Parameters

  • --bw-executable optional, should point to bw executable, defaults to /usr/bin/bw, can also be set with TG_BW_AP_EXECUTABLE_PATH env variable
  • --fallback-prompt optional, prompt to display if bw fails, defaults to "Vault password: ", can also be set with TG_BW_AP_FALLBACK_PROMPT env variable
  • --vault-item vault item ID or name, should be specific since tool will fail if multiple items are found
  • --vault-item-field, optional, field to use on the item. If not specified, password is used

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

1.0.0 - 2021-08-14

Added

  • Password helper
  • Tests

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tg-bw-helper-1.0.0.tar.gz (4.3 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page