{"id":16904453,"url":"https://github.com/insspb/ansible-role-template","last_synced_at":"2026-04-13T15:31:09.302Z","repository":{"id":95704152,"uuid":"191537855","full_name":"insspb/ansible-role-template","owner":"insspb","description":"This is template for basic ansible roles development. This template includes simple ping role and test matrix for it.","archived":false,"fork":false,"pushed_at":"2019-06-13T17:29:44.000Z","size":47,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-20T15:49:21.664Z","etag":null,"topics":["ansible","ansible-galaxy","ansible-playbook","ansible-playbooks","ansible-project","ansible-role","template","templates","test-driven-development","tests"],"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/insspb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2019-06-12T09:14:21.000Z","updated_at":"2020-03-09T23:46:29.000Z","dependencies_parsed_at":"2023-03-09T13:00:30.273Z","dependency_job_id":null,"html_url":"https://github.com/insspb/ansible-role-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/insspb/ansible-role-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insspb%2Fansible-role-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insspb%2Fansible-role-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insspb%2Fansible-role-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insspb%2Fansible-role-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/insspb","download_url":"https://codeload.github.com/insspb/ansible-role-template/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/insspb%2Fansible-role-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31759192,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T15:25:13.801Z","status":"ssl_error","status_checked_at":"2026-04-13T15:25:09.162Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","ansible-galaxy","ansible-playbook","ansible-playbooks","ansible-project","ansible-role","template","templates","test-driven-development","tests"],"created_at":"2024-10-13T18:33:26.996Z","updated_at":"2026-04-13T15:31:09.281Z","avatar_url":"https://github.com/insspb.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ansible role development template\n\n[![Build Status](https://travis-ci.org/insspb/ansible-role-template.svg?branch=master)](https://travis-ci.org/insspb/ansible-role-template) ![GitHub](https://img.shields.io/github/license/insspb/ansible-role-template.svg)\n\nThis is new template for all future ansible roles. This template include molecule tests based on docker images from the early beginning. This should make role development bugs free in the future.\n\nThe idea of this project is to receive template with configured tests for ansible role development initialization.\n\nThe second idea to bring all tests to local. That's why `tox` and docker used. This make local testing as simple as running `tox` command. Unfortunately this makes travis matrix a little simpler and `travis` builds by default takes a long time to execute even with trivial roles.\n\nAll docker container tests are repeated for every python environment selected in `tox`. This can be unnecessarily in local testing and developemnt stage, so it is recommended to limit `tox` with `-e py36` attributes (example for python 3.6). This will run only one environment.\n\nPlease keep in mind that after template installation you will not use core `tox.ini` file. This file required only for template deep testing.\n\n## Usage\n\nInit new role with [molecule](https://github.com/ansible/molecule) tool:\n\n```bash\npip install molecule\nmolecule init template --url https://github.com/insspb/ansible-role-template\n```\n\nInit new role with [cookiecutter](https://github.com/audreyr/cookiecutter) tool:\n\n```bash\npip install cookiecutter\ncookiecutter https://github.com/insspb/ansible-role-template\n```\n\n## Over-testing note\n\nYou may notice that in `tox` configuration we are using a lot of python versions and do the same. Basically this needed just to ensure that local testing will not fail on wrong python version installed. All tests do the same.  \n\nFrom the other side this approach can make fail-positive `travis` or `tox` fails if some dependency package cannot be launched in some python version. For example that's why python 3.8 support was [dropped](https://github.com/insspb/ansible-role-template/commit/f9785bb017236260182e7e02e80bb368a08707f0), while this version still in development mode.\n\nYou may also notice that we run `tox` from `tox` in the core template. This behavior is needed to ensure that template configuration is correct and installed template will work from scratch without any issues. As we mentioned before you will not see two `tox.ini` files after template installation.\n\n## yamllint note\n\n`yamllint` check is one of requirements to get high `ansible-galaxy` role score. This project has strict `yamllint` configuration. You can make work easier be adding this set of rules:\n\n```yaml\nrules:\n  new-line-at-end-of-file: disable\n  trailing-spaces: disable\n  document-start: disable\n```\n\nCurrent `ansible-galaxy` `yamllint` requirements can be found in [documentation](https://galaxy.ansible.com/docs/contributing/content_scoring.html) or [directly](https://github.com/ansible/galaxy/blob/devel/galaxy/importer/linters/yamllint.yaml).\n\n## Docker images note\n\nBy default this template uses well-known and well-tested docker images by [Jeff Geerling](https://github.com/geerlingguy). You can specify you own images on installation stage. Please do not forget to review `molecule/molecule.yml` if your change this behavior.\n\nDefault available images are:\n\n- CentOS 6\n- CentOS 7\n- Debian 8\n- Debian 9\n- Debian 10\n- Ubuntu 16.04\n- Ubuntu 18.04\n\nThis template does not include Fedora images. At all.\n\n## License\n\nMIT\n\n## Author Information\n\nThis role is contributed and maintained by [Andrey Shpak](mailto:github@ashpak.ru). I am always available for [hire](https://www.upwork.com/o/profiles/users/_~01a780866aa29e4429/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finsspb%2Fansible-role-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finsspb%2Fansible-role-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finsspb%2Fansible-role-template/lists"}