1Password / shell-plugins

Seamless authentication for every tool in your terminal.
https://developer.1password.com/docs/cli/shell-plugins/
MIT License
519 stars 170 forks source link

Add ansible-vault plugin #362

Open Sirz3chs opened 1 year ago

Sirz3chs commented 1 year ago

Overview

Add the possibility to use a stored password with ansible-vault to encrypt/decrypt strings and files.

Type of change

Related Issue(s)

How To Test

ansible-vault encrypt_string 'bar' --name 'foo' > test.yml

The output file test.yml should be something similar to:

foo: !vault |
          $ANSIBLE_VAULT;1.1;AES256
          35313266333337303865383838653937323735383737366439626361643035656164306232353938
          6363393533346134333362373466343063623661356537300a616266633538323933383139383361
          63613864356137613535356331353536653036656163363336306632653163323365313238666337
          3936613930626366320a356134393765626134346365633134383933633166643637356438356561
          6232

Then to confirm:

ansible localhost -m ansible.builtin.debug -a var="foo" -e "@test.yml"

Changelog

Add the possibilty to use a stored password as password-file to use with `ansible-vault`.
Sirz3chs commented 1 year ago

@AndyTitu I did the changes