{"repo":"wkoszek/lastpass-ansible","free":true,"listed":false,"github":"https://github.com/wkoszek/lastpass-ansible","clone":"git clone https://github.com/wkoszek/lastpass-ansible.git","description":"Unlock Ansible Vault with passwords stored in LastPass automatically","language":"Ruby","stars":22,"topics":["ansible","ssh","automation","devops","lastpass","security","shell"],"license":"BSD-2-Clause","category":"deployment-docker-iac","readme_excerpt":"Unlock Ansible Vault with LastPass Script lastpass-ansible in this project will let you unlock [Ansible Vault][] with the password stored in [LastPass][]. This means you'll be able to run ansible-playbook and ansible-vault commands without being prompted for the password: it'll be taken from LastPass automatically. You can keep your Ansible Vault passwords along with your other secrets in LastPass, and not worry about forgetting your passwords. You should also use LastPass's strong password generator for your Ansible Vault password. The 'lastpass-ansible' is designed so that it integrates easily with your existing flow. How to install You install the tool in the terminal: gem install lastpass-ansible How to use You must point Ansible to use lastpass-ansible : export ANSIBLE VAULT PASSWORD FILE= command -v lastpass-ansible Now assume you're in your web application directory: cd /Projects/my web app Now do: lastpass-ansible --init This will create a new \"site\" in LastPass in the hierarchy Ansible Vault/my web app . It'll also generate a 30-character password for this site. If you want to stick to your current Vault password Just go to LastPass, edit the site in Ansible Vault/my web app and put your password there. Save. If you want to use the new password: lpass show -c -p Ansible Vault/my web app ansible-vault rekey secrets.yml First command copies the newly generated password to the clipboard, and the second one will replace the old password with the new one. It's so called r","default_branch":null,"files":null,"tree":[],"storefront":"/r/wkoszek","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/wkoszek/lastpass-ansible/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}