{"id":15788104,"url":"https://github.com/joellefkowitz/digitalocean-inventory","last_synced_at":"2026-02-10T21:32:14.664Z","repository":{"id":62568257,"uuid":"339445447","full_name":"JoelLefkowitz/digitalocean-inventory","owner":"JoelLefkowitz","description":"An Ansible dynamic inventory for DigitalOcean.","archived":false,"fork":false,"pushed_at":"2024-05-27T22:07:28.000Z","size":87,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-12T09:52:01.789Z","etag":null,"topics":["ansible","digitalocean","inventory"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JoelLefkowitz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-16T15:38:31.000Z","updated_at":"2024-05-27T22:51:09.000Z","dependencies_parsed_at":"2024-05-27T20:49:14.454Z","dependency_job_id":"988c8fb6-a830-43cc-851b-8cecce1c0664","html_url":"https://github.com/JoelLefkowitz/digitalocean-inventory","commit_stats":{"total_commits":18,"total_committers":1,"mean_commits":18.0,"dds":0.0,"last_synced_commit":"1d225ca85820133f6e9746711e5bd47de8a2aaa3"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoelLefkowitz%2Fdigitalocean-inventory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoelLefkowitz%2Fdigitalocean-inventory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoelLefkowitz%2Fdigitalocean-inventory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JoelLefkowitz%2Fdigitalocean-inventory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JoelLefkowitz","download_url":"https://codeload.github.com/JoelLefkowitz/digitalocean-inventory/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246620386,"owners_count":20806761,"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","digitalocean","inventory"],"created_at":"2024-10-04T21:40:58.933Z","updated_at":"2026-02-10T21:32:14.625Z","avatar_url":"https://github.com/JoelLefkowitz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DigitalOcean inventory\n\nAn Ansible dynamic inventory for DigitalOcean.\n\n![Review](https://img.shields.io/github/actions/workflow/status/JoelLefkowitz/digitalocean-inventory/review.yaml)\n![Version](https://img.shields.io/pypi/v/digitalocean-inventory)\n![Downloads](https://img.shields.io/pypi/dw/digitalocean-inventory)\n![Quality](https://img.shields.io/codacy/grade/5d5c3600cd99457e8d9a3bc3f16adff8)\n![Coverage](https://img.shields.io/codacy/coverage/5d5c3600cd99457e8d9a3bc3f16adff8)\n\n## Installing\n\n```bash\npip install digitalocean-inventory\n```\n\n## Documentation\n\nDocumentation and more detailed examples are hosted on [Github Pages](https://joellefkowitz.github.io/digitalocean-inventory).\n\n## Usage\n\nExport the project environment variables:\n\n```bash\nexport DO_PROJECT=example\nexport DO_ENV=production\nexport DO_SSH_DIR=/Users/joel/.ssh/example\n```\n\nExport an access token:\n\n```bash\nexport DO_ACCESS_TOKEN=\u003ctoken\u003e\n```\n\nThe packages exposes the executable:\n\n```bash\ndigitalocean-inventory --list\n```\n\nTags and inventory metadata are compiled into the output:\n\n```json\n{\n  \"meta\": {\n    \"hostvars\": {\n      \"123.123.123.123\": {\n        \"ansible_python_interpreter\": \"/usr/bin/python3\",\n        \"ansible_ssh_extra_args\": \"-o StrictHostKeyChecking=no\",\n        \"ansible_ssh_private_key_file\": \"/Users/joel/.ssh/example/example-production-0\"\n      }\n    }\n  },\n  \"all\": {\n    \"hosts\": [\"123.123.123.123\"],\n    \"vars\": {},\n    \"children\": {}\n  },\n  \"production\": {\n    \"hosts\": [\"123.123.123.123\"]\n  },\n  \"manager\": {\n    \"hosts\": [\"123.123.123.123\"]\n  }\n}\n```\n\nThe executable has support for host, list and debug flags:\n\n```bash\nusage: Digital ocean inventory [-h] [--host [HOST]] [--list [LIST]] [--debug [DEBUG]]\n                               [--private-ips [PRIVATE_IPS]]\n\noptional arguments:\n  --host [HOST]\n  --list [LIST]\n  --debug [DEBUG]\n  --private-ips [PRIVATE_IPS]\n```\n\nTo use with the ansible-playbook cli:\n\n**`inventory.py`**:\n\n```python\n#!/usr/bin/env python\n\nfrom digitalocean_inventory import fetch\n\nif __name__ == '__main__':\n    fetch()\n```\n\n```bash\nansible-playbook -i inventory.py \u003cplaybook\u003e\n```\n\nYou can consume the inventory in order to mutate it before outputting:\n\n```python\n#!/usr/bin/env python\n\nfrom digitalocean_inventory import fetch\n\nif __name__ == '__main__':\n    inventory = fetch(stdout=False)\n    print(inventory)\n```\n\n## Tooling\n\n### Dependencies\n\nTo install dependencies:\n\n```bash\nyarn install\npip install .[all]\n```\n\n### Tests\n\nTo run tests:\n\n```bash\nthx test\n```\n\n### Documentation\n\nTo generate the documentation locally:\n\n```bash\nthx docs\n```\n\n### Linters\n\nTo run linters:\n\n```bash\nthx lint\n```\n\n### Formatters\n\nTo run formatters:\n\n```bash\nthx format\n```\n\n## Contributing\n\nPlease read this repository's [Code of Conduct](CODE_OF_CONDUCT.md) which outlines our collaboration standards and the [Changelog](CHANGELOG.md) for details on breaking changes that have been made.\n\nThis repository adheres to semantic versioning standards. For more information on semantic versioning visit [SemVer](https://semver.org).\n\nBump2version is used to version and tag changes. For example:\n\n```bash\nbump2version patch\n```\n\n### Contributors\n\n- [Joel Lefkowitz](https://github.com/joellefkowitz) - Initial work\n\n## Remarks\n\nLots of love to the open source community!\n\n\u003cdiv align='center'\u003e\n    \u003cimg width=200 height=200 src='https://media.giphy.com/media/osAcIGTSyeovPq6Xph/giphy.gif' alt='Be kind to your mind' /\u003e\n    \u003cimg width=200 height=200 src='https://media.giphy.com/media/KEAAbQ5clGWJwuJuZB/giphy.gif' alt='Love each other' /\u003e\n    \u003cimg width=200 height=200 src='https://media.giphy.com/media/WRWykrFkxJA6JJuTvc/giphy.gif' alt=\"It's ok to have a bad day\" /\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoellefkowitz%2Fdigitalocean-inventory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoellefkowitz%2Fdigitalocean-inventory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoellefkowitz%2Fdigitalocean-inventory/lists"}