{"id":18562089,"url":"https://github.com/timstaley/ansible-role-template","last_synced_at":"2025-10-07T13:58:53.161Z","repository":{"id":144783541,"uuid":"48172848","full_name":"timstaley/ansible-role-template","owner":"timstaley","description":"Ansible role-template, with added Vagrant-testing framework.","archived":false,"fork":false,"pushed_at":"2017-02-16T14:35:35.000Z","size":7,"stargazers_count":3,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-10T18:19:34.256Z","etag":null,"topics":["ansible","vagrant"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/timstaley.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-12-17T12:21:22.000Z","updated_at":"2019-12-14T15:58:10.000Z","dependencies_parsed_at":"2024-07-31T04:01:44.323Z","dependency_job_id":null,"html_url":"https://github.com/timstaley/ansible-role-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/timstaley/ansible-role-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timstaley%2Fansible-role-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timstaley%2Fansible-role-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timstaley%2Fansible-role-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timstaley%2Fansible-role-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/timstaley","download_url":"https://codeload.github.com/timstaley/ansible-role-template/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/timstaley%2Fansible-role-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278786671,"owners_count":26045588,"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","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","vagrant"],"created_at":"2024-11-06T22:08:44.061Z","updated_at":"2025-10-07T13:58:53.156Z","avatar_url":"https://github.com/timstaley.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"Ansible Role Template\n=====================\n\nA template for an Ansible-role, adding Vagrant-testing support to the \ndefault Ansible-role skeleton.\n\nAnsible is a great tool, and trying things out with a virtual-machine is a\ngreat way to learn, try things out, and test changes. But if you're trying\nto learn Ansible and Vagrant/Virtualbox all at once, configuring a test-setup\njust right can be a steep learning curve. This template demonstrates how\nto set up Vagrant to test your new Ansible role.\n\n\ntl;dr:\n------\n**To get this template running as-is:**\n\n    git clone git@github.com:timstaley/ansible-role-template.git roletemplate\n    \nNB the local folder-name is important - that's how we refer back to the\nrole from the test-script, and so the folder-name should match the \nrole-name. Then:\n\n    cd roletemplate/vagrant\n    ansible-galaxy install -f -r requirements.yml\n    vagrant up\n\n**To use this template for your own stand-alone role:**\n\n    git clone git@github.com:timstaley/ansible-role-template.git myrolename\n\nNow edit myrolename/tests/test-roletemplate.yml to change the role name \nto your own, accordingly. Then get started making changes to write your\nown role.\n\nNotes\n------\n*Vagrantfile* sets up a testing virtual-machine, \nby default named `roletestingvm` (see [Vagrantfile](vagrant/Vagrantfile)).\nThis should be renamed to something sensible for your role so you can\nrecognise it if you have multiple VM's up and running, e.g. when running::\n\n    vagrant global-status\n\n... to remind yourself where all your RAM went.\n\nThe *ansible.cfg* file tells ansible how to find the Vagrant SSH login \ndetails, which makes it easy to run Ansible manually against your \nVM via the command line, rather than indirectly\nby re-running Vagrant commands - this can speed up testing.\n\nRequirements\n------------\n\n[Vagrant-cachier](http://fgrehm.viewdocs.io/vagrant-cachier/) is recommended,\nbut optional.\n\nThis template includes an ansible-galaxy requirements file that pulls in\nthe [timstaley.base](https://github.com/timstaley/ansible-base) role, used\nfor configuring basic utilities on a fresh virtual-machine.\nHowever this is not a hard dependency but a suggestion.\nUsers of a role will have their own preferences as to e.g. exactly how `pip`\ngets installed. To retrieve a copy of the roles listed in a requirements file,\nrun::\n\n    ansible-galaxy install -r requirements.yml\n\nor\n\n    ansible-galaxy install --force -r requirements.yml\n\nto forcibly update old copies.\n\nNote that *[ansible.cfg](vagrant/ansible.cfg)* is configured such that \nroles installed via Ansible Galaxy will be installed under the\n*galaxy_roles* folder in the repository root.\n\nWhen documenting a role, you should either specify expected \npre-requisites (e.g. git) in the README, or if your dependencies \nare provided by a specific role then you should record it in the \nrole metadata ([see docs](https://galaxy.ansible.com/intro#dependencies)).\n\nLicense\n-------\n\nBSD","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimstaley%2Fansible-role-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftimstaley%2Fansible-role-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftimstaley%2Fansible-role-template/lists"}