{"id":19647866,"url":"https://github.com/nl2go/docker-ansible","last_synced_at":"2025-04-28T15:32:17.709Z","repository":{"id":101457781,"uuid":"219801678","full_name":"nl2go/docker-ansible","owner":"nl2go","description":"Containerized Ansible CLI with additional tools and packages","archived":false,"fork":false,"pushed_at":"2020-07-13T09:36:22.000Z","size":61,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-05T09:24:49.491Z","etag":null,"topics":["ansible","docker-compose","dockerfile"],"latest_commit_sha":null,"homepage":"","language":"Python","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/nl2go.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":"2019-11-05T17:17:46.000Z","updated_at":"2024-04-05T14:33:08.000Z","dependencies_parsed_at":null,"dependency_job_id":"37c2e4f9-df13-4335-833c-f1acfe606615","html_url":"https://github.com/nl2go/docker-ansible","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nl2go%2Fdocker-ansible","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nl2go%2Fdocker-ansible/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nl2go%2Fdocker-ansible/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nl2go%2Fdocker-ansible/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nl2go","download_url":"https://codeload.github.com/nl2go/docker-ansible/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251338789,"owners_count":21573613,"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","docker-compose","dockerfile"],"created_at":"2024-11-11T14:46:16.305Z","updated_at":"2025-04-28T15:32:17.689Z","avatar_url":"https://github.com/nl2go.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Travis (.org) branch](https://img.shields.io/travis/nl2go/docker-ansible/master)](https://travis-ci.org/nl2go/docker-ansible)\n[![Codecov](https://img.shields.io/codecov/c/github/nl2go/docker-ansible)](https://codecov.io/gh/nl2go/docker-ansible)\n[![Code Climate maintainability](https://img.shields.io/codeclimate/maintainability/nl2go/docker-ansible)](https://codeclimate.com/github/nl2go/docker-ansible)[\n![Docker Pulls](https://img.shields.io/docker/pulls/nl2go/ansible)](https://hub.docker.com/r/nl2go/ansible)\n[![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/nl2go/docker-ansible)](https://hub.docker.com/repository/docker/nl2go/ansible/tags?page=1)\n\n# Docker Ansible\n\nContainerized [Ansible](https://www.ansible.com/) CLI.\n\nContains additional tools/packages (s. [Dockerfile](Dockerfile)).\n\n## Usage\n\nPlace the [docker-compose.yml](dist/docker-compose.yml) into your Ansible project and run \n    \n    $ docker-compose run ansible\n\n### SSH Agent\n\nWhile using  SSH key authentication method to access remote resources, ensure that the encrypted private\nkey is located at the `.ssh/id_rsa` path within the user directory.\n\n - Linux/macOS: `$HOME/.ssh/id_rsa`\n - Windows: `$USERPROFILE/.ssh/id_rsa`\n\nAfter starting the Ansible container the key passphrase will be prompted.\n\n    $ docker-compose run ansible\n    Starting SSH Agent.\n    Enter passphrase for /root/.ssh/id_rsa: \n\n### Ansible Vault\n\n[Ansible Vault](https://docs.ansible.com/ansible/latest/user_guide/vault.html) allows to keep sensitive data like\npasswords or keys encrypted. It supports encryption of whole files as well as single variables.\n\nTo clearly separate\nand restrict access to different inventories/environments multiple Ansible Vault passwords are indispensable.\n\nWhen operating Ansible playbooks frequently, typing the Vault password on every execution can be cumbersome, especially\nwith multiple environments in place.\n\nWhile offering a possibility to reference password files, Ansible Vault does not provide a convenient feature to create or\nmanage those, apart from the fact that an official integration into a password manager like\n[Gnome-Keyring](https://de.wikipedia.org/wiki/Gnome_Keyring) doesn't exist.\n\nTo overcome the limitations of the status quo a convenient method to manage multiple Ansible Vault password\nfiles is provided.\n\n#### Create Encrypted Password Files\n\nInitially an encrypted password file for every inventory/environment must be created using a personal master and environment\nrelated Ansible Vault password. This is a one time operation per inventory/environment. Add `.vault-password` to the\n`gitignore` patterns to prevent accidental check-ins.\n\n    $ cd inventories/prod\n    $ ansible-encrypt-vault-password\n    Enter the master password for .vault-password files:\n    Enter the vault password for prod inventory:\n    Created /ansible/inventories/prod/.vault-password.\n   \n   \nAs a result master password encrypted `inventories/prod/.vault-password` file that contains the environment Ansible Vault\npassword is created.\n\n#### Load Encrypted Password Files\n\nThe encrypted password files are loaded when a new container is started.\n \n    $ docker-compose run ansible\n    ...\n    Decrypting Ansible Vault passwords.\n    Enter decryption password for .vault-password files: \n    Decrypting /ansible/inventories/prod/.vault-password.\n    \n    \nAlternatively encrypted password files may be reloaded within existing container.\n\n    $ cd /ansible\n    $ ansible-vault-init\n    Decrypting Ansible Vault passwords.\n    Enter decryption password for .vault-password files: \n    Decrypting /ansible/inventories/prod/.vault-password.\n\n#### Encrypt Secrets\nSecret values are encrypted per inventory (e.g. inventory `prod`, secret value `foo`).\n\n    $ ansible-vault encrypt_string --encrypt-vault-id 'prod' 'foo'\n    !vault |\n              $ANSIBLE_VAULT;1.2;AES256;production-de\n              33636332626264316661363731393861333764313361326262313664336435366666306664636434\n              3339643439333138303035373866363265326132653363380a303937343963303530666337396561\n              31626334633162323731323539393330366633386338393439613332373362383137383930616362\n              3066383536323139610a616434643664613435356365356330636435633666353864626439626335\n              6664\n\n### Ansible Galaxy\n\nBigger Ansible projects frequently utilize Ansible Galaxy Roles that can be installed using a `requirements.yml` file.\nRoles installation can be triggered from the container.\n\n    $ cd /ansible\n    ansible-galaxy-init\n    Skipping Ansible Galaxy roles installation. No \"/ansible/roles/requirements.yml\" file present.\n\nIt's a tiny wrapper for `ansible-galaxy install -r /ansible/roles/requirements.yml` that ensures that the `requirements.yml`\nis placed into the right location expected by [Ansible Tower](https://www.ansible.com/products/tower).\n\n## Development\n\nYou can run the locally build image with:\n\n    docker-compose run ansible\n\nTo rebuild the image run:\n\n    docker-compose build\n\n## Maintainers\n\n- [build-failure](https://github.com/build-failure)\n\n## License\n\nSee the [LICENSE.md](LICENSE.md) file for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnl2go%2Fdocker-ansible","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnl2go%2Fdocker-ansible","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnl2go%2Fdocker-ansible/lists"}