{"id":19764494,"url":"https://github.com/hostwithquantum/ansible-openstack-inventory","last_synced_at":"2025-02-28T03:44:28.295Z","repository":{"id":46992826,"uuid":"307498344","full_name":"hostwithquantum/ansible-openstack-inventory","owner":"hostwithquantum","description":"An opinionated dynamic inventory tool for Ansible and OpenStack.","archived":false,"fork":false,"pushed_at":"2021-09-18T14:29:09.000Z","size":81,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-11T00:08:25.395Z","etag":null,"topics":["ansible","ansible-inventory-script","openstack"],"latest_commit_sha":null,"homepage":"https://www.planetary-quantum.com/","language":"Go","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/hostwithquantum.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":null,"security":null,"support":null}},"created_at":"2020-10-26T20:38:42.000Z","updated_at":"2024-11-21T22:02:04.000Z","dependencies_parsed_at":"2022-09-04T04:41:08.561Z","dependency_job_id":null,"html_url":"https://github.com/hostwithquantum/ansible-openstack-inventory","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hostwithquantum%2Fansible-openstack-inventory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hostwithquantum%2Fansible-openstack-inventory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hostwithquantum%2Fansible-openstack-inventory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hostwithquantum%2Fansible-openstack-inventory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hostwithquantum","download_url":"https://codeload.github.com/hostwithquantum/ansible-openstack-inventory/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241096244,"owners_count":19908937,"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","ansible-inventory-script","openstack"],"created_at":"2024-11-12T04:13:59.937Z","updated_at":"2025-02-28T03:44:28.276Z","avatar_url":"https://github.com/hostwithquantum.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ansible-openstack-inventory\n\nInventory script for a dynamic OpenStack-based inventory.\n\nThis script creates a default group `all` and various child groups which are configured via `config.ini`. We also use multiple networks on instances, therefor a default/access network for Ansible has to be configured.\n\n## Project Status\n\nThis is not a general purpose inventory for all OpenStack clouds, but instead it's heavily tailored towards what we use and need to bootstrap nodes for our [application hosting service](https://www.planetary-quantum.com).\n\nSpecifically in regards to Docker Swarm, inventory script returns nodes and adds groups and labels for each node/group:\n\n - `docker_swarm_manager`\n - `docker_swarm_worker`\n\nGroup membership and (`swarm_`)labels are determined by instance metadata:\n\n - `com.planetary-quantum.meta.role` (`manager` (default), worker)\n - `com.planetary-quantum.meta.label`\n\nBecause documentation on dynamic inventories is a bit sparse, we decided to release this code to the broader community. And despite Ansible using Python, we wrote this inventory script in Go(lang) as we felt that at this part in the stack, we should run something less brittle.\n\nSo feel free to use, copy, fork and ad[a,o]pt - and feel free to contribute. Please keep in mind, that the code in this repository has to work for our use-case first.\n\n## Usage\n\nWe use gophercloud to interface with OpenStack, the usual environment variables are listed in [`.envrc-dist`](.envrc-dist).\n\n```\n$ QUANTUM_CUSTOMER=... ./ansible-openstack-inventory\n```\n\n## Testing\n\nParts of the Go code are covered with unit tests. Full integration tests available in [e2e/](e2e/).\n\n\n## Todo\n\n- [x] return correct JSON format of hosts\n- [x] how to add additional groups\n- [x] implement `--list`\n- [x] implement `--host node`\n- [x] better error handling (instead of `os.Exit`)\n\n## License\n\nBSD-2-Clause, Copyright 2021 (and beyond) [Planetary Quantum GmbH](https://www.planetary-quantum.com/service/impressum/)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhostwithquantum%2Fansible-openstack-inventory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhostwithquantum%2Fansible-openstack-inventory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhostwithquantum%2Fansible-openstack-inventory/lists"}