{"id":20675605,"url":"https://github.com/bitwarden/sm-ansible","last_synced_at":"2025-07-03T17:35:49.802Z","repository":{"id":223945965,"uuid":"728769066","full_name":"bitwarden/sm-ansible","owner":"bitwarden","description":"Ansible integration for Secrets Manager","archived":false,"fork":false,"pushed_at":"2025-06-25T10:15:26.000Z","size":217,"stargazers_count":10,"open_issues_count":12,"forks_count":4,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-06-26T07:47:48.672Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bitwarden.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-12-07T16:48:08.000Z","updated_at":"2025-06-23T14:09:13.000Z","dependencies_parsed_at":"2024-02-22T22:30:40.651Z","dependency_job_id":"1e655d58-5d15-41d5-957f-f727f554d3aa","html_url":"https://github.com/bitwarden/sm-ansible","commit_stats":null,"previous_names":["bitwarden/sm-ansible"],"tags_count":0,"template":false,"template_full_name":"bitwarden/template","purl":"pkg:github/bitwarden/sm-ansible","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitwarden%2Fsm-ansible","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitwarden%2Fsm-ansible/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitwarden%2Fsm-ansible/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitwarden%2Fsm-ansible/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bitwarden","download_url":"https://codeload.github.com/bitwarden/sm-ansible/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bitwarden%2Fsm-ansible/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263370167,"owners_count":23456425,"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","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":[],"created_at":"2024-11-16T21:09:57.677Z","updated_at":"2025-07-03T17:35:49.769Z","avatar_url":"https://github.com/bitwarden.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bitwarden Secrets Manager Collection\n\nSecurely retrieve secrets from Bitwarden Secrets Manager and use them in your Ansible playbooks.\n\n## Getting started\n\n### Install dependencies\n\nThe Bitwarden Secrets Manager Collection requires the `bitwarden-sdk` package. You can install it by\nrunning the following command:\n\n```bash\npip install bitwarden-sdk\n```\n\n### Install the collection\n\nYou can install the Bitwarden Secrets Manager Collection by running:\n\n```bash\nansible-galaxy collection install bitwarden.secrets\n```\n\n### Update your playbook\n\nBefore running your playbook, you need to set the `BWS_ACCESS_TOKEN` environment variable:\n\n```bash\n# the line below will prevent lines with leading spaces from being saved to bash history\nexport HISTCONTROL=ignorespace\n\n# the space in the line below keeps your access token out of bash history\n export BWS_ACCESS_TOKEN=\u003cyour_access_token\u003e\n```\n\nAlternatively, you may supply the access token as a parameter to the `bitwarden.secrets.lookup`\nplugin:\n\n\u003c!-- prettier-ignore --\u003e\n```yaml\n- name: A simple example\n  hosts: localhost\n\n  vars_prompt:\n  - name: \"your_access_token\"\n    prompt: \"Enter your Bitwarden access token\"\n    private: yes\n\n  vars:\n    some_secret: \"{{ lookup('bitwarden.secrets.lookup', '\u003cyour_secret_id\u003e', access_token=your_access_token) }}\"\n```\n\n\u003c!-- prettier-ignore --\u003e\n\u003e [!Note]\\\n\u003e We are using a `vars_prompt` to avoid storing the access token in the playbook. While\n\u003e there are many ways to pass the access token to the lookup plugin, we recommend against storing it\n\u003e in the playbook itself.\n\nFor more information on how to use the Bitwarden Secrets Manager Collection, see the\n[documentation](https://bitwarden.com/help/ansible-integration).\n\n### Run your playbook\n\nOnce you've updated your playbook to use the Bitwarden Secrets Manager lookup plugin, you can run it\nwith the `ansible-playbook` command:\n\n```bash\nansible-playbook \u003cpath_to_your_playbook.yml\u003e\n```\n\n#### macOS\n\nIf your Ansible controller is running macOS, you may need to set the following environment variable\nto avoid an error related to fork safety:\n\n```bash\nexport OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES\n```\n\nSee\n[running on macos as a control node](https://docs.ansible.com/ansible/latest/reference_appendices/faq.html#running-on-macos-as-a-control-node)\nand [this GitHub issue](https://github.com/ansible/ansible/issues/49207) for more details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitwarden%2Fsm-ansible","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbitwarden%2Fsm-ansible","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbitwarden%2Fsm-ansible/lists"}