This collection provides a series of Ansible modules and plugins for interacting with the Azure.
Documentation of individual modules is available at the Ansible Galaxy
- Python version >= 3.10
- Ansible version >= 2.16
Before using this collection, you need to install it with the Ansible Galaxy command-line tool:
ansible-galaxy collection install azure.azcollection
You can also include it in a requirements.yml file and install it with ansible-galaxy collection install -r requirements.yml
, using the format:
collections:
- name: azure.azcollection
To upgrade the collection to the latest available version, run the following command:
ansible-galaxy collection install azure.azcollection --upgrade
You can also install a specific version of the collection. Use the following syntax to install version 1.0.0:
ansible-galaxy collection install azure.azcollection==1.0.0
See using Ansible collections for more details.
After the collection is installed, please install the dependencies required by the collection (adjust path to collection if necessary):
pip install -r ~/.ansible/collections/ansible_collections/azure/azcollection/requirements.txt
To use a module from Azure collection, please reference the full namespace, collection name, and modules name that you want to use:
---
- name: Using Azure collection
hosts: localhost
tasks:
- azure.azcollection.azure_rm_storageaccount:
resource_group: myResourceGroup
name: mystorageaccount
account_type: Standard_LRS
Or you can add full namespace and collection name in the collections
element:
---
- name: Using Azure collection
hosts: localhost
collections:
- azure.azcollection
tasks:
- azure_rm_storageaccount:
resource_group: myResourceGroup
name: mystorageaccount
account_type: Standard_LRS
For existing Ansible roles, please also reference the full namespace, collection name, and modules name which used in tasks instead of just modules name.
To use a plugin from Azure collection, please reference the full namespace, collection name, and plugins name that you want to use:
---
plugin: azure.azcollection.azure_rm
include_vm_resource_groups:
- ansible-inventory-test-rg
auth_source: auto
Test cases can be found under folder tests
.
There are many ways in which you can participate in the project, for example:
- Submit bugs and feature requests, and help us verify as they are checked in
- Review source code changes
- Review the documentation and make pull requests for anything from typos to new content
- If you are interested in fixing issues and contributing directly to the code base, please see the CONTRIBUTING document
As Red Hat Ansible Certified Content, this collection is entitled to support through the Ansible Automation Platform (AAP) using the Create issue button on the top right corner. If a support case cannot be opened with Red Hat and the collection has been obtained either from Galaxy or GitHub, there may community help available on the Ansible Forum.
See the Changelog
- Ansible Official Documentation: A comprehensive Ansible user guide.
- azure.azcolleciton Documentation: Detailed information about the collection.
- Azure Documentation
GNU General Public License v3.0
See LICENSE to see the full text.