{"id":31710386,"url":"https://github.com/wkoszek/lastpass-ansible","last_synced_at":"2025-10-09T00:27:00.183Z","repository":{"id":56880771,"uuid":"83994346","full_name":"wkoszek/lastpass-ansible","owner":"wkoszek","description":"Unlock Ansible Vault with LastPass","archived":false,"fork":false,"pushed_at":"2017-03-18T15:24:53.000Z","size":91,"stargazers_count":22,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-11T10:33:58.640Z","etag":null,"topics":["ansible","automation","ssh"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wkoszek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-05T18:59:20.000Z","updated_at":"2025-03-13T11:16:46.000Z","dependencies_parsed_at":"2022-08-20T22:31:22.216Z","dependency_job_id":null,"html_url":"https://github.com/wkoszek/lastpass-ansible","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wkoszek/lastpass-ansible","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wkoszek%2Flastpass-ansible","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wkoszek%2Flastpass-ansible/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wkoszek%2Flastpass-ansible/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wkoszek%2Flastpass-ansible/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wkoszek","download_url":"https://codeload.github.com/wkoszek/lastpass-ansible/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wkoszek%2Flastpass-ansible/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278855596,"owners_count":26057701,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","automation","ssh"],"created_at":"2025-10-09T00:26:57.479Z","updated_at":"2025-10-09T00:27:00.177Z","avatar_url":"https://github.com/wkoszek.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Unlock Ansible Vault with LastPass\n\n[![Build Status](https://travis-ci.org/wkoszek/lastpass-ansible.svg?branch=master)](https://travis-ci.org/wkoszek/lastpass-ansible)\n\nScript `lastpass-ansible` in this project will let you unlock [Ansible\nVault][] with the password stored in [LastPass][]. This means you'll be able\nto run `ansible-playbook` and `ansible-vault` commands without being\nprompted for the password: it'll be taken from LastPass automatically.\n\nYou can keep your Ansible Vault passwords along with your other\nsecrets in LastPass, and not worry about forgetting your passwords.\nYou should also use LastPass's strong password generator for your Ansible\nVault password.\n\nThe 'lastpass-ansible' is designed so that it integrates easily with your\nexisting flow.\n\n# How to install\n\nYou install the tool in the terminal:\n\n\tgem install lastpass-ansible\n\n# How to use\n\nYou must point Ansible to use `lastpass-ansible`:\n\n\texport ANSIBLE_VAULT_PASSWORD_FILE=`command -v lastpass-ansible`\n\nNow assume you're in your web application directory:\n\n\tcd ~/Projects/my_web_app\n\nNow do:\n\n\tlastpass-ansible --init\n\nThis will create a new \"site\" in LastPass in the hierarchy `Ansible_Vault/my_web_app`.\nIt'll also generate a 30-character password for this site.\n\n**If you want to stick to your current Vault password**\n\nJust go to LastPass, edit the site in `Ansible_Vault/my_web_app` and put your password there. Save.\n\n**If you want to use the new password:**\n\n\tlpass show -c -p Ansible_Vault/my_web_app\n\tansible-vault rekey secrets.yml\n\nFirst 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 re-keying the Vault. Clear the clipboard afterwards.\n\n\n# More details and custom settings\n\nFile `.lastpass-ansible.conf` has been created along with the password. It just\ntells `lastpass-ansible` which LastPass site to use to get the proper password.\nIf you're fine with `Ansible_Vault/...`, then you can remove this file. It's a\ndefault lookup location.\n\nIf you're a picky person and you don't like `Ansible_Vault` OR you want to\npoint `lastpass-ansible` to an existing hierarchy of sites in LastPass, just stick it\nto `.lastpass-ansible.conf`.  It's format is very easy:\n\n\t# lastpass-ansible configuration file. For more details read:\n\t# https://github.com/wkoszek/lastpass-ansible\n\tMyWebSites/my_web_app\n\nAnd it'll work. The order of lookup for this LastPass site name is:\n\n1. `.lastpass-ansible.conf` file\n2. `LASTPASS_ANSIBLE_NAME` environment variable\n3. Name guessed based on a directory: \"Ansible_Vault\" + name\n\nIt should be safe to commit `.lastpass-ansible.conf` to your repository.\nIf you're paranoid, just use `LASTPASS_ANSIBLE_NAME` environment variable\nfor passing this name. Otherwise just use the guessed name. I think it's the\nmost convenient.\n\n[Ansible Vault]: http://docs.ansible.com/ansible/playbooks_vault.html\n[LastPass]: https://www.lastpass.com\n\n## More\n\n- [How to use Ansible Vault with LastPass](https://www.koszek.com/blog/2017/03/05/how-to-use-ansible-vault-with-lastpass/)\n\n## Author\n\n- Wojciech Adam Koszek, [wojciech@koszek.com](mailto:wojciech@koszek.com)\n- [http://www.koszek.com](http://www.koszek.com)\n- Twitter: [@wkoszek](https://twitter.com/wkoszek)\n- LinkedIn: [wkoszek](https://www.linkedin.com/in/wkoszek)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwkoszek%2Flastpass-ansible","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwkoszek%2Flastpass-ansible","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwkoszek%2Flastpass-ansible/lists"}