{"id":18337438,"url":"https://github.com/mikemix/dockerized-ansible-playground","last_synced_at":"2026-05-07T06:36:21.041Z","repository":{"id":149688972,"uuid":"130189173","full_name":"mikemix/dockerized-ansible-playground","owner":"mikemix","description":"Dockerized Ansible playground","archived":false,"fork":false,"pushed_at":"2018-04-19T12:30:05.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-09T20:17:20.569Z","etag":null,"topics":["ansible","bash-scripting","debian","docker","playground"],"latest_commit_sha":null,"homepage":null,"language":"Shell","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/mikemix.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-04-19T09:08:29.000Z","updated_at":"2018-04-19T12:30:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"c98ab9b4-a4cd-44b6-af31-9ac1147d6e62","html_url":"https://github.com/mikemix/dockerized-ansible-playground","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mikemix/dockerized-ansible-playground","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikemix%2Fdockerized-ansible-playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikemix%2Fdockerized-ansible-playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikemix%2Fdockerized-ansible-playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikemix%2Fdockerized-ansible-playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mikemix","download_url":"https://codeload.github.com/mikemix/dockerized-ansible-playground/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mikemix%2Fdockerized-ansible-playground/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32726276,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-07T02:14:30.463Z","status":"ssl_error","status_checked_at":"2026-05-07T02:14:29.405Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["ansible","bash-scripting","debian","docker","playground"],"created_at":"2024-11-05T20:11:12.544Z","updated_at":"2026-05-07T06:36:21.009Z","avatar_url":"https://github.com/mikemix.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"Ansible playground\n==================\n\n`Debian:stretch` based ansible playground. Spawn containers, allow passwordless root login for fun.\n\nScripts assume your public key is located at `$HOME/.ssh/id_rsa.pub`. Have fun.\n\n## Build image\n\n`bin/build`\n\n```\nSending build context to Docker daemon  7.168kB\nStep 1/6 : FROM debian:stretch\n ---\u003e 2b98c9851a37\nStep 2/6 : RUN apt-get update \u0026\u0026 apt-get install -y openssh-server\n ---\u003e Using cache\n ---\u003e 8be2a9865b70\nStep 3/6 : RUN mkdir /var/run/sshd\n ---\u003e Using cache\n ---\u003e e932f211fb8e\nStep 4/6 : RUN sed -i 's/#PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config\n ---\u003e Using cache\n ---\u003e a6bb7fedf882\nStep 5/6 : EXPOSE 22\n ---\u003e Using cache\n ---\u003e 3805c1a41181\nStep 6/6 : CMD [\"/usr/sbin/sshd\", \"-D\"]\n ---\u003e Using cache\n ---\u003e 2b8703296660\nSuccessfully built 2b8703296660\nSuccessfully tagged eg_sshd:latest\n```\n\n## Spawn containers\n\n`bin/up 5`\n\n```\nsshd_1 - 22/tcp -\u003e 0.0.0.0:32800\nsshd_2 - 22/tcp -\u003e 0.0.0.0:32801\nsshd_3 - 22/tcp -\u003e 0.0.0.0:32802\nsshd_4 - 22/tcp -\u003e 0.0.0.0:32803\nsshd_5 - 22/tcp -\u003e 0.0.0.0:32804\n```\n\n`docker ps`\n\n```\nCONTAINER ID        IMAGE               COMMAND               CREATED             STATUS              PORTS                   NAMES\n72e95f32352e        eg_sshd             \"/usr/sbin/sshd -D\"   17 seconds ago      Up 15 seconds       0.0.0.0:32818-\u003e22/tcp   sshd_5\n466fe1b99450        eg_sshd             \"/usr/sbin/sshd -D\"   19 seconds ago      Up 17 seconds       0.0.0.0:32817-\u003e22/tcp   sshd_4\n5a07de62cd8b        eg_sshd             \"/usr/sbin/sshd -D\"   20 seconds ago      Up 18 seconds       0.0.0.0:32816-\u003e22/tcp   sshd_3\n4474b5851ab4        eg_sshd             \"/usr/sbin/sshd -D\"   22 seconds ago      Up 20 seconds       0.0.0.0:32815-\u003e22/tcp   sshd_2\na0d25077424c        eg_sshd             \"/usr/sbin/sshd -D\"   24 seconds ago      Up 22 seconds       0.0.0.0:32814-\u003e22/tcp   sshd_1\n```\n\n## SSH into the container\n\nKnown host is added to `/dev/null` by the way so it won't spam your `known_hosts` file.\n\n`bin/ssh 3`\n\n```\nWarning: Permanently added '[localhost]:32802' (ECDSA) to the list of known hosts.\nLinux d1200bbb7e9b 4.4.0-119-generic #143-Ubuntu SMP Mon Apr 2 16:08:24 UTC 2018 x86_64\n\nThe programs included with the Debian GNU/Linux system are free software;\nthe exact distribution terms for each program are described in the\nindividual files in /usr/share/doc/*/copyright.\n\nDebian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent\npermitted by applicable law.\n\nroot@d1200bbb7e9b:~#\n```\n\n## Destroy containers\n\n`bin/destroy`\n\n```\nd1200bbb7e9b\n4f3e602979cb\n0d8c7824dee3\n375202686b3d\n3ed64b6c7474\n```\n\n## Dynamic Ansible inventory\n\nBash script fetches running container list and outputs list in Ansible's JSON format:\n\nExample usage:\n\n`ansible-playbook -i ansible/inventory playbook.yml`\n\nScript output:\n\n\u003e {\"Ansible\":{\"hosts\":[\"78e45d91ae22.localhost\",\"612ed77c432c.localhost\",\"e3bb7c4a0fa9.localhost\"]},\"_meta\":{\"hostvars\":{\"78e45d91ae22.localhost\":{\"ansible_ssh_port\":\"32813\",\"ansible_ssh_user\":\"root\",\"ansible_connection\":\"ssh\"},\"612ed77c432c.localhost\":{\"ansible_ssh_port\":\"32812\",\"ansible_ssh_user\":\"root\",\"ansible_connection\":\"ssh\"},\"e3bb7c4a0fa9.localhost\":{\"ansible_ssh_port\":\"32811\",\"ansible_ssh_user\":\"root\",\"ansible_connection\":\"ssh\"}}}}\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikemix%2Fdockerized-ansible-playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmikemix%2Fdockerized-ansible-playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmikemix%2Fdockerized-ansible-playground/lists"}