{"id":28429759,"url":"https://github.com/appsilon/ansible-role-template","last_synced_at":"2025-07-04T19:31:48.723Z","repository":{"id":38234713,"uuid":"462273424","full_name":"Appsilon/ansible-role-template","owner":"Appsilon","description":null,"archived":false,"fork":false,"pushed_at":"2024-07-12T13:31:19.000Z","size":32,"stargazers_count":4,"open_issues_count":5,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-27T11:38:02.938Z","etag":null,"topics":["ansible"],"latest_commit_sha":null,"homepage":null,"language":"Jinja","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/Appsilon.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-22T11:47:29.000Z","updated_at":"2024-11-18T12:21:49.000Z","dependencies_parsed_at":"2023-11-07T12:23:37.499Z","dependency_job_id":"601fa9b5-94a6-41c4-89d1-ba682fa150e4","html_url":"https://github.com/Appsilon/ansible-role-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Appsilon%2Fansible-role-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Appsilon%2Fansible-role-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Appsilon%2Fansible-role-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Appsilon%2Fansible-role-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Appsilon","download_url":"https://codeload.github.com/Appsilon/ansible-role-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Appsilon%2Fansible-role-template/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":258232506,"owners_count":22668849,"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"],"created_at":"2025-06-05T13:39:05.361Z","updated_at":"2025-07-04T19:31:48.707Z","avatar_url":"https://github.com/Appsilon.png","language":"Jinja","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ansible Role Template\n\n[![Pipeline Status](https://github.com/Appsilon/ansible-role-template/actions/workflows/ci.yml/badge.svg)](https://github.com/Appsilon/ansible-role-template/actions/workflows/ci.yml)\n\nThis repository provides a base scaffolding template to use as a quick start of\nall Ansible roles at @Appsilon. Includes best practices that should always be\nused, like linter, tests, CI, etc.\n\n## How to Use\n\n1. Click \"[Use this\n   template](https://github.com/Appsilon/ansible-role-template/generate)\" to\n   create a new repository from it.\n1. Update [`./meta/main.yml`](./meta/main.yml) with updated repository and role names.\n1. Update [`./role_README.md`](./role_README.md) with updated to repository and role name.\n1. Rename `./role_README.md` to `README.md`.\n1. Start coding! You're free to change anything.\n\n## Development\n\n### Dependencies\n\nTo execute tests locally, it is necessary to install the following\ndependencies:\n\n* [Python](https://www.python.org/downloads/)\n* [Molecule](https://molecule.readthedocs.io/en/latest/installation.html)\n\n### Preparing the Environment\n\nCreate a Python environment:\n\n```bash\npython3 -m venv .venv\n```\n\nActivate the environment:\n\n```bash\nsource .venv/bin/activate\n```\n\nInstall molecule (and its dependencies) inside the environment:\n\n```bash\npython3 -m pip install -r requirements.txt\n```\n\n### Running\n\n```bash\nmolecule test\n```\n\nTo perform quick test after some modification:\n\n```bash\nmolecule create\nmolecule converge\nmolecule verify\n```\n\nTo log into the running instance for troubleshooting purposes:\n\n```bash\nmolecule login\n```\n\nAt the end of the test, destroy the environment:\n\n```bash\nmolecule destroy\n```\n\n### Validation, Linters and Pull-Requests\n\nWe want to provide high quality code. For this reason we are using several\n[pre-commit hooks](.pre-commit-config.yaml) and [GitHub Actions\nworkflow](.github/workflows/precommit.yaml). A pull-request to the `main`\nbranch will trigger these validations and lints automatically. Please check your\ncode before you will create pull-requests.\n\nBefore you can run hooks, you need to have the `pre-commit`\n[installed](https://pre-commit.com#install).\n\n```bash\npip install pre-commit\npre-commit install\n```\n\nIf you are going to enforce [Conventional\nCommits](https://www.conventionalcommits.org/) commit message style on the title\nyou will also need to\n[install](https://jorisroovers.com/gitlint/#getting-started) `gitlint`.\n\n```bash\npip install gitlint\n```\n\nYou then need to install the pre-commit hook like so:\n\n```bash\npre-commit install --hook-type commit-msg\n```\n\n\u003e It's important that you run `pre-commit install --hook-type commit-msg`, even\n\u003e if you've already used `pre-commit install` before. `pre-commit install` does\n\u003e not install `commit-msg` hooks by default!\n\nTo manually trigger `gitlint` using `pre-commit` for your last commit message,\nuse the following command:\n\n```sh\npre-commit run gitlint --hook-stage commit-msg --commit-msg-filename .git/COMMIT_EDITMSG\n```\n\nIn case you want to change gitlint's behavior, you should either use a\n`.gitlint` file (see\n[Configuration](https://jorisroovers.com/gitlint/configuration)) or modify the\ngitlint invocation in your `.pre-commit-config.yaml` file like so:\n\n```yaml\n-   repo: https://github.com/jorisroovers/gitlint\n    rev:  # Fill in a tag / sha here\n    hooks:\n    -   id: gitlint\n        args: [--contrib=CT1, --msg-filename]\n```\n\nSee [pre-commit documentation](https://pre-commit.com/) and [GitHub Actions\ndocumentation](https://docs.github.com/en/actions) for further details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappsilon%2Fansible-role-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappsilon%2Fansible-role-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappsilon%2Fansible-role-template/lists"}