{"id":20334968,"url":"https://github.com/mdb/ansible-hello-world","last_synced_at":"2026-03-06T07:31:51.954Z","repository":{"id":55917364,"uuid":"317032560","full_name":"mdb/ansible-hello-world","owner":"mdb","description":"A simple Ansible role reference example demonstrating how to use Docker as a Molecule test driver","archived":false,"fork":false,"pushed_at":"2020-12-07T13:01:29.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-06T11:18:16.957Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Makefile","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/mdb.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-11-29T20:01:10.000Z","updated_at":"2020-12-07T13:01:31.000Z","dependencies_parsed_at":"2022-08-15T09:20:49.047Z","dependency_job_id":null,"html_url":"https://github.com/mdb/ansible-hello-world","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mdb/ansible-hello-world","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdb%2Fansible-hello-world","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdb%2Fansible-hello-world/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdb%2Fansible-hello-world/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdb%2Fansible-hello-world/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mdb","download_url":"https://codeload.github.com/mdb/ansible-hello-world/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mdb%2Fansible-hello-world/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30165622,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T04:43:31.446Z","status":"ssl_error","status_checked_at":"2026-03-06T04:40:30.133Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":[],"created_at":"2024-11-14T20:38:46.081Z","updated_at":"2026-03-06T07:31:51.896Z","avatar_url":"https://github.com/mdb.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ansible-hello-world\n\nA basic [Ansible role](https://docs.ansible.com/ansible/latest/user_guide/playbooks_reuse_roles.html) reference example demonstrating how to use [Docker](https://docker.io) as the [Molecule](https://molecule.readthedocs.io/en/latest/) test driver, as well as in creating a development environment. It's intended as a reference example accompanying [mikeball.info/blog/testing-ansible-roles-with-docker-in-docker](http://www.mikeball.info/blog/testing-ansible-roles-with-docker-in-docker/).\n\nThis also demonstrates how to leverage Docker-in-Docker to test the role in a Concourse CI/CD task.\n\n## Overview\n\nFor the sake of simplicity, the role's only responsibility is to create a `/hello-world.json` file on the targeted host. Its `molecule/converge.yml` file invokes the role against a Dockerized Ubuntu test container, while its `molecule/verify.yml` tests that the role behaved as expected and properly creates the `/hello-world.json` file on the targeted host. It requires no development dependencies beyond Docker.\n\n## Test\n\nRun `make` to start a [clapclapexcitement/dind-ansible-molecule](https://hub.docker.com/r/clapclapexcitement/dind-ansible-molecule/) container instance (with the Docker, Python, Ansible, Molecule dependencies pre-installed) and run `molecule test` from within the container:\n\n```\nmake\n```\n\n## Bonus: Continuous Integration\n\n### Concourse\n\nSee `ci/task.yml` for an example [Concourse task](https://concourse-ci.org/tasks.html).\n\nThe task uses the same `clapclapexcitement/dind-ansible-molecule` image used in development.\n\nIts use within a Concourse pipeline `pipeline.yml` configuration file might look something like this, for example:\n\n```yaml\nresources:\n\n- name: ansible-hello-world-pull-request\n  type: pull-request\n  check_every: 24h\n  webhook_token: ((webhook-token))\n  source:\n    repository: mdb/ansible-hello-world\n    access_token: ((access-token))\n    v3_endpoint: https://github.com/api/v3/\n    v4_endpoint: https://github.com/api/graphql\n\nresource_types:\n\n- name: pull-request\n  type: registry-image\n  source:\n    repository: teliaoss/github-pr-resource\n\njobs:\n\n- name: verify-pull-request\n  plan:\n  - get: ansible-hello-world-pull-request\n    trigger: true\n  - put: ansible-hello-world-pull-request\n    params:\n      path: ansible-hello-world-pull-request\n      status: pending\n  - task: test\n    file: ansible-hello-world-pull-request/ci/tasks/test.yml\n    privileged: true\n    on_success:\n      put: ansible-hello-world-pull-request\n      params:\n        path: ansible-hello-world-pull-request\n        status: success\n    on_failure:\n      put: ansible-hello-world-pull-request\n      params:\n        path: ansible-hello-world-pull-request\n        status: failure\n    on_error:\n      put: ansible-hello-world-pull-request\n      params:\n        path: ansible-hello-world-pull-request\n        status: failure\n```\n\n### GitHub Actions\n\nSee `.github/workflows/ci.yml` for an example [GitHub Actions](https://github.com/features/actions) CI workflow.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdb%2Fansible-hello-world","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmdb%2Fansible-hello-world","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmdb%2Fansible-hello-world/lists"}