{"id":15357920,"url":"https://github.com/mefengl/ansible-docker-compose","last_synced_at":"2026-02-06T19:31:32.686Z","repository":{"id":191822893,"uuid":"685434287","full_name":"mefengl/ansible-docker-compose","owner":"mefengl","description":"A \"hello world\" example of using Ansible with Docker Compose.","archived":false,"fork":false,"pushed_at":"2023-09-01T06:26:12.000Z","size":3,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-05T00:05:07.736Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Dockerfile","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/mefengl.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":"2023-08-31T08:12:45.000Z","updated_at":"2024-06-24T14:00:44.000Z","dependencies_parsed_at":"2024-10-30T10:14:44.309Z","dependency_job_id":"4227f9d3-56d3-4eea-a489-bd6250955f19","html_url":"https://github.com/mefengl/ansible-docker-compose","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"1363d8a6380ad45160487cd5291231888ad3099b"},"previous_names":["mefengl/ansible-docker-compose"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mefengl/ansible-docker-compose","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mefengl%2Fansible-docker-compose","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mefengl%2Fansible-docker-compose/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mefengl%2Fansible-docker-compose/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mefengl%2Fansible-docker-compose/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mefengl","download_url":"https://codeload.github.com/mefengl/ansible-docker-compose/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mefengl%2Fansible-docker-compose/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29174099,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-06T19:28:14.811Z","status":"ssl_error","status_checked_at":"2026-02-06T19:28:13.420Z","response_time":59,"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":[],"created_at":"2024-10-01T12:39:34.337Z","updated_at":"2026-02-06T19:31:32.669Z","avatar_url":"https://github.com/mefengl.png","language":"Dockerfile","readme":"# Ansible-Docker-Compose Example\n\nThis repository contains a simple example that demonstrates how to set up an Ansible control node and a managed node using Docker Compose. The Ansible control node runs a \"Hello, World!\" playbook on the managed node.\n\n## Prerequisites\n\n- Docker\n- Docker Compose\n\n## Quick Start\n\n### Clone the Repository\n\nClone this repository to your local machine.\n\n```bash\ngit clone https://github.com/mefengl/ansible-docker-compose.git\n```\n\nNavigate to the project directory.\n\n```bash\ncd ansible-docker-compose\n```\n\n### Build and Run Docker Containers\n\nRun the following commands to build and start the Docker containers.\n\n```bash\ndocker-compose build\ndocker-compose up -d\n```\n\n### Get Managed Node IP\n\nRun this command to get the IP address of the managed node.\n\n```bash\ndocker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker ps -q --filter \"name=ansible_managed\")\n```\n\nNote down the IP address for the next step.\n\n### Run Ansible Playbook\n\n1. Connect to the Ansible control node:\n\n    ```bash\n    docker exec -it $(docker ps -q --filter \"name=ansible_control\") /bin/bash\n    ```\n\n2. Create an inventory file (`hosts.ini`) with the IP address obtained in the previous step and specify the local connection plugin:\n\n    ```bash\n    echo -e \"[managed]\\n\u003cip_address\u003e ansible_connection=local\" | tee hosts.ini\n    ```\n\n    Replace `\u003cip_address\u003e` with the actual IP address.\n\n3. Run the Ansible playbook:\n\n    ```bash\n    ansible-playbook -i hosts.ini /ansible/hello-world.yml -u root\n    ```\n\n## Expected Output\n\nYou should see the \"Hello, World!\" message output from the Ansible playbook, indicating it ran successfully on the managed node.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmefengl%2Fansible-docker-compose","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmefengl%2Fansible-docker-compose","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmefengl%2Fansible-docker-compose/lists"}