azure.azure_preview_modules

This repository is no longer maintained. Please visit AzCollection.

azure.azure_preview_modules

This role is comprehensive and includes all the latest Azure modules. Updates and bug fixes are made more quickly than in official Ansible releases.

If you're using Ansible to set up Azure resources, it's highly recommended to install this role.

Prerequisites

To use this playbook role, you need to have an Ansible environment set up for Azure. For more information, check the Ansible tutorial on Getting Started with Azure or Install and configure Ansible.

Installation

  1. Install the role.
$ ansible-galaxy install azure.azure_preview_modules
  1. Upgrade the Azure Python SDKs needed for the new Azure modules.
$ pip install -r ~/.ansible/roles/azure.azure_preview_modules/files/requirements-azure.txt

or

$ sudo pip install -r ~/.ansible/roles/azure.azure_preview_modules/files/requirements-azure.txt

There are several reasons for installing these Python SDKs:

  • A new module has been added to the role for an Azure resource that is not yet in existing Ansible releases. You need to install the SDK for this new resource.

  • Newer SDK versions may have breaking changes. You should install a specific working version.

The necessary SDKs are listed in the ~/files/requirements-azure.txt file, found within the installed role folder, typically located at ~/.ansible/roles/files.

Make sure the SDKs are installed in the same location as the existing Azure Python SDKs. If you encounter any errors with the above command, check the installation location closely.

For example, in Ubuntu, the existing SDKs might be in folders like /home/<your-user-name>/.local/lib/python2.7/site-packages or /usr/local/lib/python2.7/dist-packages. The first is a user folder; the second is a system folder that requires sudo access. This depends on how you’ve installed ansible. Essentially, install the SDKs the same way you installed ansible, so they are in the same site-packages folder.

On macOS, existing SDKs could be found in folders like /Users/<your-user-name>/Library/Python/2.7/lib/python/site-packages or /Library/Python/2.7/site-packages, with the same user/system folder distinction.

To find the correct site-packages path, run the following command to check the details of an existing package, like azure-mgmt-storage.

$ pip show azure-mgmt-storage

You might see output like this:

your-user-name@ansible:~$ pip show azure-mgmt-storage
Name: azure-mgmt-storage
Version: 1.5.0
Summary: Microsoft Azure Storage Management Client Library for Python
Home-page: https://github.com/Azure/azure-sdk-for-python
Author: Microsoft Corporation
Author-email: [email protected]
License: MIT License
Location: /home/<your-user-name>/.local/lib/python2.7/site-packages
Requires: azure-common, azure-mgmt-nspkg, msrestazure

This tells you that the SDKs are in the user site-packages folder, so use pip install to install the listed packages. If they're in a system path, use sudo pip install.

Role Variables

None.

Dependencies

No dependencies on other roles.

Example Playbook

- hosts: localhost
  roles:
    - { role: azure.azure_preview_modules }
  tasks:
  - name: create storage account
    azure_rm_storageaccount:
      resource_group: resourcegroupname
      name: storagename
      account_type: Standard_LRS

License

MIT

Informazioni sul progetto

latest Azure modules for provisioning Azure resources

Installa
ansible-galaxy install azure.azure_preview_modules
Licenza
Unknown
Download
60.9k
Proprietario
APIs, SDKs and open source projects from Microsoft Azure