{"id":19222957,"url":"https://github.com/pyratlabs/ansible-role-azcli","last_synced_at":"2026-05-06T06:39:47.475Z","repository":{"id":69224757,"uuid":"229443461","full_name":"PyratLabs/ansible-role-azcli","owner":"PyratLabs","description":"Ansible role for installing an Azure CLI (azure-cli) into a Python3 VirtualEnv.","archived":false,"fork":false,"pushed_at":"2020-07-09T07:36:42.000Z","size":22,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-04T20:46:49.009Z","etag":null,"topics":["ansible","ansible-role","automation","azure","azure-cli","cloud","infrastructure-as-code"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PyratLabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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-12-21T15:04:01.000Z","updated_at":"2020-10-27T16:51:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"741f1b7f-0fe2-44d5-8910-5f0d4aa3c9df","html_url":"https://github.com/PyratLabs/ansible-role-azcli","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyratLabs%2Fansible-role-azcli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyratLabs%2Fansible-role-azcli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyratLabs%2Fansible-role-azcli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyratLabs%2Fansible-role-azcli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PyratLabs","download_url":"https://codeload.github.com/PyratLabs/ansible-role-azcli/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240298399,"owners_count":19779281,"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","ansible-role","automation","azure","azure-cli","cloud","infrastructure-as-code"],"created_at":"2024-11-09T15:06:01.688Z","updated_at":"2026-05-06T06:39:42.442Z","avatar_url":"https://github.com/PyratLabs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ansible Role: azurecli\n\nAnsible role for installing an Azure CLI (`azure-cli`) into a Python3 VirtualEnv.\n\n[![Build Status](https://www.travis-ci.org/PyratLabs/ansible-role-azcli.svg?branch=master)](https://www.travis-ci.org/PyratLabs/ansible-role-azcli)\n\n## Requirements\n\nThis role has been tested on Ansible 2.7.0+ against the following Linux Distributions:\n\n  - Amazon Linux 2\n  - CentOS 8\n  - CentOS 7\n  - Debian 10\n  - Fedora 29\n  - Fedora 30\n  - Fedora 31\n  - Ubuntu 18.04 LTS\n\nThe target server requires the following packages:\n\n  - python3\n  - python3 development packages\n  - python3 venv\n  - gcc\n\n## Disclaimer\n\nIf you have any problems please create a GitHub issue, I maintain this role in\nmy spare time so I cannot promise a speedy fix delivery.\n\n## Role Variables\n\n\n| Variable                        | Description                                                                    | Default Value        |\n|---------------------------------|--------------------------------------------------------------------------------|----------------------|\n| `azcli_version`                 | Use a specific version of azure-cli, eg. `2.0.78`. Specify `false` for latest. | `false`              |\n| `azcli_install_dir`             | Installation directory to put azure-cli virtual environments.                  | `$HOME/.virtualenvs` |\n| `azcli_venv_name`               | Name for the azure-cli Virtualenv.                                             | azure-cli            |\n| `azcli_venv_suffix`             | Add a custom suffix to virtualenv.                                             | `azcli_version`      |\n| `azcli_venv_site_packages`      | Allow venv to inherit packages from global site-packages.                      | `false`              |\n| `azcli_install_venv_helper`     | Install a venv helper to launch venv executables from a \"bin\" directory.       | `true`               |\n| `azcli_bin_dir`                 | \"bin\" directory to install venv-helpers to.                                    | `$HOME/bin`          |\n| `azcli_install_os_dependencies` | Allow role to install OS dependencies.                                         | `false`              |\n| `azcli_python3_path`            | Specify a path to a specific python version to use in virtualenv.              | _NULL_               |\n\n## Dependencies\n\nNo dependencies on other roles.\n\n## Example Playbook\n\nExample playbook for installing to single user:\n\n```yaml\n- hosts: azcli_hosts\n  roles:\n     - { role: xanmanning.azurecli, azcli_version: 2.0.78 }\n```\n\nExample playbook for installing the latest azure-cli version globally:\n\n```yaml\n---\n- hosts: azcli_hosts\n  become: true\n  vars:\n    azcli_install_os_dependencies: true\n    azcli_install_dir: /opt/azure-cli/bin\n    azcli_bin_dir: /usr/bin\n    azcli_venv_name: current\n  roles:\n    - role: xanmanning.azurecli\n```\n\n### Activating the azure-cli venv\n\nYou need to activate the python3 virtual environment to be able to access `az`.\nThis is done as per the below:\n\n```bash\nsource {{ azure_install_dir }}/{{ azcli_venv_name }}/bin/activate\n```\n\nIn the above example global installation playbook, this would look like the\nfollowing:\n\n```bash\nsource /opt/azure-cli/bin/current/bin/activate\n```\n\n## License\n\n[BSD 3-clause](LICENSE.txt)\n\n## Author Information\n\n[Xan Manning](https://xanmanning.co.uk/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyratlabs%2Fansible-role-azcli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpyratlabs%2Fansible-role-azcli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyratlabs%2Fansible-role-azcli/lists"}