{"id":13647874,"url":"https://github.com/dysosmus/ansible-completion","last_synced_at":"2025-10-23T19:32:46.513Z","repository":{"id":14759676,"uuid":"17481002","full_name":"dysosmus/ansible-completion","owner":"dysosmus","description":"Basic bash completion for Ansible","archived":false,"fork":false,"pushed_at":"2021-03-25T21:42:43.000Z","size":49,"stargazers_count":152,"open_issues_count":5,"forks_count":50,"subscribers_count":13,"default_branch":"master","last_synced_at":"2024-11-09T22:35:53.564Z","etag":null,"topics":["ansible","bash","completion","shell"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dysosmus.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}},"created_at":"2014-03-06T14:48:48.000Z","updated_at":"2024-09-07T00:46:34.000Z","dependencies_parsed_at":"2022-09-20T12:40:49.061Z","dependency_job_id":null,"html_url":"https://github.com/dysosmus/ansible-completion","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/dysosmus%2Fansible-completion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dysosmus%2Fansible-completion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dysosmus%2Fansible-completion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dysosmus%2Fansible-completion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dysosmus","download_url":"https://codeload.github.com/dysosmus/ansible-completion/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250183333,"owners_count":21388697,"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","bash","completion","shell"],"created_at":"2024-08-02T01:03:48.813Z","updated_at":"2025-10-23T19:32:46.439Z","avatar_url":"https://github.com/dysosmus.png","language":"Shell","funding_links":[],"categories":["Shell","completion"],"sub_categories":[],"readme":"\n\n# ansible-completion\n\n\nProvide a bash completion on host name, module name and options for [ansible](https://github.com/ansible/ansible \"ansible git repository\").\n\n## Important\n[As of Ansible 2.9, you can add shell completion of the Ansible command line utilities by installing an optional dependency called argcomplete. argcomplete supports bash, and has limited support for zsh and tcsh.](https://docs.ansible.com/ansible/devel/installation_guide/intro_installation.html#shell-completion)\n\nThe difference with the official auto-completion is ansible-completion support completion of the hosts, based on the inventory file, and modules.\nThe official auto-completion is however much more up-to-date with all the arguments names.\n\n## Installation\n\n 1. Get the `ansible-completion.bash` file.\n\n 2. Copy/move the `ansible-completion.bash` in your `bash_completion.d`\n    folder (`/etc/bash_completion.d`, `/usr/local/etc/bash_completion.d`or `~/bash_completion.d`).\n\n 3. **Or** copy/move it where you want and then load the `ansible-completion.bash` file in your `~/.bashrc` or `~/.profile` like that: \n \t\tsource ~/ansible-completion.bash\n\n 4. Reload your shell with something like `source ~/.bashrc` or `source ~/.profile`\n\n### Note for OSX\n\n1. Clone the repo, install bash an auto-completion2 with homebew: ```brew install bash bash-completion2```\n2. Change your terminal bash to a homebrew one by setting the ```command``` option to ```/usr/local/bin/bash```\n3. Add the following code to your ```~/.profile```:\n\n    ```\n    if [ -f $(brew --prefix)/share/bash-completion/bash_completion ]; then\n      . $(brew --prefix)/share/bash-completion/bash_completion\n    fi\n    ```\n2. Create a symbolik link for ```\tansible-completion.bash```:\n\n    ```\n    ln -vs ~/soft/ansible-completion/ansible-completion.bash /usr/local/share/bash-completion/completions/ansible\n    ```\n\n## Good to know\n\nIf the `--module-path` (`-M`) or `--inventory-file` (`-i`) is on the command line, the completion will use it.\n\nFor the completion on module name, the completion script build a cache of modules names.\n\nYou can set the cache timeout with the environement variable `ANSIBLE_COMPLETION_CACHE_TIMEOUT`, the default value is `120` seconds.\n\n## Contributors\n\n- [ogarcia](https://github.com/ogarcia)\n- [pheanex](https://github.com/pheanex) (ansible-* completions) \n- [DenKoren](https://github.com/DenKoren)\n- [hryamzik](https://github.com/hryamzik) \n- [mrqwer88](https://github.com/mrqwer88)\n- [wolfgangkarall](https://github.com/wolfgangkarall)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdysosmus%2Fansible-completion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdysosmus%2Fansible-completion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdysosmus%2Fansible-completion/lists"}