Ansible - Load vault password from keepass
For local playbooks using vaults, I tend to store the vault password in keepassxc. You can use the following method to retrieve the vault password directly from ansible In ~/bin/get_keepass_password.py: add the script to get the password from keepassxc: from pathlib import Path class IncorrectPassword(Exception): pass def get_keepass_password(keepass_database_path: Path, keepass_entry_name: str): import os # --- # KEEPASS PASSWORD try: keepass_password = os.environ['KEEPASS_PASSWORD'] password_provided_by_environment = True except KeyError: keepass_password = input(f'Keepass password for file {keepass_database_path....