{"id":23009557,"url":"https://github.com/devolutions/ansible-dvls","last_synced_at":"2025-08-14T04:32:43.321Z","repository":{"id":250316153,"uuid":"833827902","full_name":"Devolutions/ansible-dvls","owner":"Devolutions","description":"Ansible integration to fetch secrets from dvls","archived":false,"fork":false,"pushed_at":"2024-12-04T20:48:47.000Z","size":13,"stargazers_count":1,"open_issues_count":1,"forks_count":1,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-12-04T21:34:21.580Z","etag":null,"topics":["ansible","devops"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Devolutions.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-25T20:51:44.000Z","updated_at":"2024-11-19T19:07:10.000Z","dependencies_parsed_at":"2024-08-19T22:42:57.689Z","dependency_job_id":"237ce3ac-4365-4d7a-bc6c-7c7676c5ad0f","html_url":"https://github.com/Devolutions/ansible-dvls","commit_stats":null,"previous_names":["devolutions/ansible-dvls"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devolutions%2Fansible-dvls","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devolutions%2Fansible-dvls/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devolutions%2Fansible-dvls/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Devolutions%2Fansible-dvls/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Devolutions","download_url":"https://codeload.github.com/Devolutions/ansible-dvls/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229800401,"owners_count":18126028,"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":["ansible","devops"],"created_at":"2024-12-15T09:14:56.802Z","updated_at":"2025-08-14T04:32:43.302Z","avatar_url":"https://github.com/Devolutions.png","language":"Python","readme":"# DVLS Ansible Module\n\nThis Ansible module allows you to authenticate with DVLS and fetch server information, vaults, and secrets.\n\n## Features\n- Authenticate with DVLS using application identities.\n- Fetch server information, vault lists, or specific secrets.\n- Flexible support for static secrets or fetching all secrets in a vault.\n\n## Requirements\n- Ansible 2.18\n- Python `requests` library\n- A DVLS application identity (create at `{your-dvls-url}/administration/applications`).\n  - The application must have permissions to fetch the desired secrets.\n\nSet the following environment variables for DVLS authentication:\n```sh\nexport DVLS_APP_KEY=\"your_app_key_here\"\nexport DVLS_APP_SECRET=\"your_app_secret_here\"\n```\n\n## Usage with static secrets file\n\n### Example secrets.yml\nDefine the secrets you want to fetch in ```secrets.yml```:\n\n```yaml\nsecrets:\n  - secret_name: \"my_secret_1\"\n  - secret_name: \"my_secret_2\"\n  - secret_id: \"12345678-1234-1234-1234-123456789012\"\n```\n\n### Example playbook.yml\nUse the following playbook to authenticate with DVLS and fetch the secrets defined in ```secrets.yml```:\n\n```yaml\n  vars_files:\n    - secrets.yml\n  tasks:\n    - name: Fetch secrets\n      devolutions.dvls.fetch_secrets:\n        server_base_url: \"https://example.yourcompany.com\"\n        app_key: \"{{ lookup('env', 'DVLS_APP_KEY') }}\"\n        app_secret: \"{{ lookup('env', 'DVLS_APP_SECRET') }}\"\n        vault_id: \"00000000-0000-0000-0000-000000000000\"\n        secrets: \"{{ secrets }}\"\n      register: value\n\n    - name: Dump secrets\n      debug:\n        msg: \"{{ value }}\"\n\n    - name: Dump a secret\n      debug:\n        msg: \"{{ value['name-or-id'].value }}\"\n```\n\n## Usage fetching all secrets\n\n### Example playbook.yml using a VaultID\nUse the following playbook to authenticate with DVLS and fetch every secrets from a defined VaultID:\n\n```yaml\n  tasks:\n    - name: Fetch secrets\n      devolutions.dvls.fetch_secrets:\n        server_base_url: \"https://example.yourcompany.com\"\n        app_key: \"{{ lookup('env', 'DVLS_APP_KEY') }}\"\n        app_secret: \"{{ lookup('env', 'DVLS_APP_SECRET') }}\"\n        vault_id: \"00000000-0000-0000-0000-000000000000\"\n      register: value\n\n    - name: Dump secrets\n      debug:\n        msg: \"{{ value }}\"\n\n    - name: Dump a secret\n      debug:\n        msg: \"{{ value['name-or-id'].value }}\"\n```\n\n## Usage fetching server info and vaults list\n\n```yaml\n---\n- name: Fetch dvls server information\n    server:\n    server_base_url: \"https://example.yourcompany.com\"\n    app_key: \"{{ lookup('env', 'DVLS_APP_KEY') }}\"\n    app_secret: \"{{ lookup('env', 'DVLS_APP_SECRET') }}\"\n  register: value\n\n- name: Fetch URI\n  debug:\n    msg: \"{{ value.accessURI }}\"\n\n- name: Fetch a vault from the list\n  debug:\n    msg: \"{{ value.vaults[1].id }}\"\n```\n\nExample response\n\n```json\n{\n    \"server\": {\n        \"accessURI\": \"https://example.dvls-server.com/\",\n        \"changed\": false,\n        \"failed\": false,\n        \"vaults\": [\n            {\n                \"description\": \"User vault for personal entries\",\n                \"id\": \"123e4567-e89b-12d3-a456-426614174000\",\n                \"type\": \"User\"\n            },\n            {\n                \"description\": \"Shared vault for organization\",\n                \"id\": \"987f6543-d21c-43ba-987f-123456789abc\",\n                \"name\": \"Organization vault\",\n                \"type\": \"Shared\"\n            }\n        ],\n        \"version\": \"2025.1.0.0\"\n    }\n}\n```\n\n## Secrets definition\n\nTo access a particular field within a secret, you can use the format ```{{ secrets['name-or-id'].value }}```. Here's a breakdown of the available categories and their fields:\n\n| **Category**              | **Fields**                                                                                                                |\n|---------------------------|---------------------------------------------------------------------------------------------------------------------------|\n| Username and password     | `domain`, `password`, `username`                                                                                          |\n| Connection string         | `connectionString`                                                                                                        |\n| Secret                    | `password`                                                                                                                |\n| API key                   | `apiId`, `apiKey`, `tenantId`                                                                                             |\n| SSH key                   | `domain`, `password`, `privateKeyData`, `privateKeyOverridePassword`, `privateKeyPassPhrase`, `publicKeyData`, `username` |\n| Azure service principal   | `clientId`, `clientSecret`, `tenantId`                                                                                    |\n\n\n### Example using secret value\nFor example, if you want to access the ```apiId``` from an ```API key secret```, you would use the following syntax:\n\n```yaml\n{{ secrets['some api key'].apiId }}\n```\n\n## Usage writing secrets\n\nIf there is an existing secret in that path, it will update the secret. Otherwise a new secret entry will be created.\nWhen a new secret was created or updated, the module will return the entry ID.\n\n```yaml\n- name: Upload Credentials to DVLS\n  devolutions.dvls.create_secret:\n    server_base_url: \"https://example.yourcompany.com\"\n    app_key: \"{{ lookup('env', 'DVLS_APP_KEY') }}\"\n    app_secret: \"{{ lookup('env', 'DVLS_APP_SECRET') }}\"\n    vault_id: \"00000000-0000-0000-0000-000000000000\"\n    secret:\n      secret_name: \"my_secret_1\"\n      value: \"p@ssw0rd1\"\n```\n\nExample with additional available options (Currently only the \"Credential\" type and \"Default\" subtype are supported):\n\n```yaml\n- name: Upload Credentials to DVLS\n  devolutions.dvls.create_secret:\n    server_base_url: \"https://example.yourcompany.com\"\n    app_key: \"{{ lookup('env', 'DVLS_APP_KEY') }}\"\n    app_secret: \"{{ lookup('env', 'DVLS_APP_SECRET') }}\"\n    vault_id: \"00000000-0000-0000-0000-000000000000\"\n    secret:\n      secret_name: \"my_secret_1\"\n      value: \"p@ssw0rd1\"\n      secret_path: \"path\\\\to\\\\folder\"\n      secret_type: \"Credentials\"\n      secret_subtype: \"Default\"\n      secret_description: \"a description for the secret\"\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevolutions%2Fansible-dvls","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevolutions%2Fansible-dvls","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevolutions%2Fansible-dvls/lists"}