This collection provides a series of Ansible modules and plugins for interacting with the Azure.
Documentation of individual modules is available in the Ansible docs site
See the complete list of collection content in the Plugin Index.
-
Join the Ansible forum:
- Get Help: get help or help others. Please use appropriate tags, for example
cloud
. - Social Spaces: gather and interact with fellow enthusiasts.
- News & Announcements: track project-wide announcements including social events.
- Get Help: get help or help others. Please use appropriate tags, for example
-
The Ansible Bullhorn newsletter: used to announce releases and important changes.
For more information about communication, see the Ansible communication guide.
It is recommended to run ansible in Virtualenv
- ansible version >= 2.16
To install Azure collection hosted in Galaxy:
ansible-galaxy collection install azure.azcollection
Install dependencies required by the collection (adjust path to collection if necessary):
pip3 install -r ~/.ansible/collections/ansible_collections/azure/azcollection/requirements.txt
Or, if you can't use pip, e.g. when you are on Ubuntu/Debian:
pipx runpip ansible install -r ~/.ansible/collections/ansible_collections/azure/azcollection/requirements.txt
To upgrade to the latest version of Azure collection:
ansible-galaxy collection install azure.azcollection --force
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
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
GNU General Public License v3.0
See LICENSE to see the full text.