{"id":15663562,"url":"https://github.com/gableroux/docker-ansible","last_synced_at":"2025-10-10T17:09:05.246Z","repository":{"id":45059843,"uuid":"161067421","full_name":"GabLeRoux/docker-ansible","owner":"GabLeRoux","description":"Docker image to use ansible and ssh in a CI 👍","archived":false,"fork":false,"pushed_at":"2024-05-30T14:13:04.000Z","size":215,"stargazers_count":17,"open_issues_count":8,"forks_count":10,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-29T05:04:00.815Z","etag":null,"topics":["ansible","ci","docker-ansible","docker-auto-build","docker-automated","docker-image","gitlab-ci","hacktoberfest"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/r/gableroux/ansible/","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/GabLeRoux.png","metadata":{"files":{"readme":"ReadMe.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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-12-09T18:10:06.000Z","updated_at":"2024-06-28T18:05:56.000Z","dependencies_parsed_at":"2024-10-23T08:37:12.438Z","dependency_job_id":"81944894-d9c5-4e78-8966-ddb173bee3be","html_url":"https://github.com/GabLeRoux/docker-ansible","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabLeRoux%2Fdocker-ansible","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabLeRoux%2Fdocker-ansible/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabLeRoux%2Fdocker-ansible/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabLeRoux%2Fdocker-ansible/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GabLeRoux","download_url":"https://codeload.github.com/GabLeRoux/docker-ansible/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249204660,"owners_count":21229779,"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","ci","docker-ansible","docker-auto-build","docker-automated","docker-image","gitlab-ci","hacktoberfest"],"created_at":"2024-10-03T13:38:17.207Z","updated_at":"2025-10-10T17:09:00.196Z","avatar_url":"https://github.com/GabLeRoux.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Docker ansible\n\nDocker image to use [`ansible`](https://www.ansible.com/) and `ssh` in a CI :+1:\n\n[![Docker Stars](https://img.shields.io/docker/stars/gableroux/ansible.svg)](https://hub.docker.com/r/gableroux/ansible)\n[![Docker Pulls](https://img.shields.io/docker/pulls/gableroux/ansible.svg)](https://hub.docker.com/r/gableroux/ansible)\n[![Requirements Status](https://requires.io/github/GabLeRoux/docker-ansible/requirements.svg?branch=main)](https://requires.io/github/GabLeRoux/docker-ansible/requirements/?branch=main)\n\n## Usage\n\n### Command line\n\n```bash\ndocker run --rm -it gableroux/ansible:5.1.0\n```\n\n### gitlab-ci example\n\n```yaml\n.ansible:5.1.0\n  stage: deploy\n  when: manual\n  image: gableroux/ansible:5.1.0\n  before_script:\n    # https://docs.gitlab.com/ee/ci/ssh_keys/\n    - eval $(ssh-agent -s)\n    - mkdir ~/.ssh/\n    - chmod 700 ~/.ssh\n    - echo \"$SSH_CONFIG\" \u003e ~/.ssh/config\n    - echo \"$SSH_KNOWN_HOSTS\" \u003e ~/.ssh/known_hosts\n    - chmod 644 ~/.ssh/known_hosts\n    - echo \"$SSH_PRIVATE_KEY\" | tr -d '\\r' | ssh-add - \u003e /dev/null\n\ndeploy-example-master:\n  \u003c\u003c: *ansible\n  script:\n    - ansible --version\n    - ansible-playbook -i host-example deploy.yml\n  only:\n    - master\n```\n\n## FAQ\n\n### How to deploy new docker image\n\nThere is a script in `scripts` that reads values from `versions.txt` and runs required commands to push to the repository with tags and trigger docker hub. :v:\n\n### Why bother using a docker image\n\nInstalling with `pip` is fine, but pulling this image is faster.\n\n### Why not use an official ansible image?\n\n[As described here in the short description](https://store.docker.com/r/ansible/ansible):\n\n\u003e Images for automated testing of Ansible. They do not include Ansible and are not for end users.\n\nThe official image is used to run tests for the ansible project. I wish they had and official image for actually running ansible.\n\n### My version is not there, what can I do?\n\nHave a look at [hub.docker.com/r/gableroux/ansible/tags](https://hub.docker.com/r/gableroux/ansible/tags), most versions are available. There are automatic PRs setup for upgrading the project so the version you're looking for should be there. If for some reason, it's still not there, you can fork the project, replace `ENV` and push your own image. Image building is done trough github-actions.\n\n### Can I contribute?\n\nYes, why not?\n\n### There are already a lot of ansible docker images out there, why a new one?\n\nI don't trust people when it comes to running critical code against infrastructure. If you wish to use this, I recommend you to fork it and build your own. There are many good alternatives, notably [William-Yeh/docker-ansible](https://github.com/William-Yeh/docker-ansible), but I found it was kind of big or doing too many things. This docker image is based on alpine and is very minimal and small :)\n\n### How is this image deployed to docker hub?\n\nI'm using [github-actions](https://github.com/features/actions). See [`.github/workflows/`](https://github.com/gableroux/docker-ansible/tree/main/.github/workflows/)\n\n## License\n\n[MIT](LICENSE.md) © [Gabriel Le Breton](https://gableroux.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgableroux%2Fdocker-ansible","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgableroux%2Fdocker-ansible","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgableroux%2Fdocker-ansible/lists"}