{"id":13715594,"url":"https://gitlab.com/jlecomte/ansible/ansible-roster","last_synced_at":"2025-05-07T04:30:55.247Z","repository":{"id":57879238,"uuid":"12339949","full_name":"jlecomte/ansible/ansible-roster","owner":"jlecomte","description":"⭐ **Ansible Roster inventory plugin to generate inventory from a host oriented yaml file. Supports ranges (eg: \"[0:9]\"), regex hostnames (eg: \"(dev|prd)-srv\"), file inclusions, and variable merging.**","archived":false,"fork":false,"pushed_at":null,"size":null,"stargazers_count":7,"open_issues_count":1,"forks_count":0,"subscribers_count":null,"default_branch":"master","last_synced_at":"2024-11-14T03:34:32.488Z","etag":null,"topics":["ansible","debops","devops","⭐"],"latest_commit_sha":null,"homepage":null,"language":null,"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://gitlab.com/uploads/-/system/project/avatar/12339949/plugin.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-15T09:05:15.482Z","updated_at":"2024-09-23T08:58:34.937Z","dependencies_parsed_at":"2022-09-03T04:42:31.075Z","dependency_job_id":null,"html_url":"https://gitlab.com/jlecomte/ansible/ansible-roster","commit_stats":null,"previous_names":[],"tags_count":8,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/jlecomte%2Fansible%2Fansible-roster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/jlecomte%2Fansible%2Fansible-roster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/jlecomte%2Fansible%2Fansible-roster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories/jlecomte%2Fansible%2Fansible-roster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/owners/jlecomte","download_url":"https://gitlab.com/jlecomte/ansible/ansible-roster/-/archive/master/ansible-roster-master.zip","host":{"name":"gitlab.com","url":"https://gitlab.com","kind":"gitlab","repositories_count":4518896,"owners_count":6976,"icon_url":"https://github.com/gitlab.png","version":null,"created_at":"2022-05-30T11:31:42.605Z","updated_at":"2024-07-18T11:24:13.055Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/gitlab.com/owners"}},"keywords":["ansible","debops","devops","⭐"],"created_at":"2024-08-03T00:01:00.912Z","updated_at":"2025-05-07T04:30:55.187Z","avatar_url":"https://gitlab.com/uploads/-/system/project/avatar/12339949/plugin.png","language":null,"funding_links":[],"categories":["Tools"],"sub_categories":[],"readme":"[![documentation](https://img.shields.io/badge/documentation-html-informational)](https://jlecomte.gitlab.io/ansible/ansible-roster)\n[![license](https://img.shields.io/badge/license-MIT-brightgreen)](https://spdx.org/licenses/MIT.html)\n[![pipelines](https://gitlab.com/jlecomte/ansible/ansible-roster/badges/master/pipeline.svg)](https://gitlab.com/jlecomte/ansible/ansible-roster/pipelines)\n[![coverage](https://gitlab.com/jlecomte/ansible/ansible-roster/badges/master/coverage.svg)](https://jlecomte.gitlab.io/ansible/ansible-roster/coverage/index.html)\n\n# Ansible Roster Inventory Plugin\n\n**roster**: _(noun)_ a list of members of a team, in particular of sports players available for team selection.\n\nRoster is an Ansible inventory plugin with focus on groups applied to hosts instead of hosts included in groups. It supports ranges (eg: \"[0:9]\"), regex hostnames (eg: \"(dev|prd)-srv\"), file inclusions, and variable merging.\n\nThis inventory plugin has been written with [*debops*](https://docs.debops.org/en/master/) in mind.\n\n## Installation from Ansible Galaxy\n\nYou can install the latest version from Ansible Galaxy repository.\n\n~~~bash\nansible-galaxy collection install -U julien_lecomte.roster\npython3 -mpip install boltons cerberus exrex\n~~~\n\nIf you are using *requirement.yml* files for downloading collections and roles, add these lines:\n\n~~~yaml\ncollections:\n  - julien_lecomte.roster\n~~~\n\n## Installation from PyPI\n\nYou can install the latest version from PyPI package repository.\n\n~~~bash\npython3 -mpip install -U ansible-roster\n~~~\n\n## Quickstart\n\nPlease refer to the [full documentation](https://jlecomte.gitlab.io/ansible/ansible-roster/) for all the details.\n\nThe roster is a file in yaml format and 'yml' or 'yaml' file extension.\n\nIn order for Ansible to use the plugin and parse your roster file, several conditions must be met:\n\n* Your yaml file must contain a line indicating that the file is in the roster format.\n\n* You must activate plugins and enable the roster inventory plugin in your `ansible.cfg`, or in your `.debops.cfg` if using *debops*. If using *debops*, refresh the configuration with *debops project refresh*.\n\n**Sample `ansible.cfg`**\n\n~~~toml\n[defaults]\n# The following line prevents having to pass -i to ansible-inventory.\n# Filename can be anything as long as it has a 'yml' or 'yaml' extension although\ninventory = roster.yml\n\n[inventory]\n# You must enable the roster plugin if 'auto' does not work for you.\n# Use 'roster' if installed via the Python package,\n# Use 'julien_lecomte.roster.roster' if installed via Ansible Galaxy\nenable_plugins = julien_lecomte.roster.roster\n~~~\n\n**Sample `.debops.cfg`**\n\n~~~toml\n[ansible inventory]\nenabled = roster\n# Use 'roster' if installed via the Python package,\n# Use 'julien_lecomte.roster.roster' if installed via Ansible Galaxy\nenable_plugins = julien_lecomte.roster.roster\n~~~\n\n**Sample `roster.yml`**\n\n~~~yaml\n---\n# This line is mandatory, and enables the plugin differenciating between\n# any yaml file and a roster yaml file.\nplugin: roster\n\nvars:\n  foobar01: \"a global var\"\n\ngroups:\n  debian:\n    vars:\n      distrib: \"debian\"\n  buster:\n    parents:\n      - debian\n    vars:\n      release: \"buster\"\n  desktops:\n    vars:\n      components: \"main contrib non-free\"\n\nhosts:\n  desktop01.internal.example.com:\n    groups:\n      - desktops\n      - buster\n~~~\n\nA larger example Roster inventory for DebOps can be found here: [https://gitlab.com/jlecomte/ansible/ansible-roster-example](https://gitlab.com/jlecomte/ansible/ansible-roster-example).\n\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n\n## Support\n\nShow your support by joining the Discord server (link below), or by adding a star to the project.\n\n\n## Locations\n\n  * Documentation: [https://jlecomte.gitlab.io/ansible/ansible-roster/](https://jlecomte.gitlab.io/ansible/ansible-roster)\n  * GitLab: [https://gitlab.com/jlecomte/ansible/ansible-roster](https://gitlab.com/jlecomte/ansible/ansible-roster)\n  * PyPi: [https://pypi.org/project/ansible-roster](https://pypi.org/project/ansible-roster)\n  * Galaxy: [https://galaxy.ansible.com/julien_lecomte/roster](https://galaxy.ansible.com/julien_lecomte/roster)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/gitlab.com%2Fjlecomte%2Fansible%2Fansible-roster","html_url":"https://awesome.ecosyste.ms/projects/gitlab.com%2Fjlecomte%2Fansible%2Fansible-roster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/gitlab.com%2Fjlecomte%2Fansible%2Fansible-roster/lists"}