Skip to content
This repository has been archived by the owner on Feb 24, 2022. It is now read-only.

azure_rm_netapp_volume

Chris Archibald edited this page Mar 18, 2021 · 1 revision
orphan:

netapp.azure.azure_rm_netapp_volume -- Manage NetApp Azure Files Volume

Note

This plugin is part of the netapp.azure collection (version 21.3.0).

To install it use: ansible-galaxy collection install netapp.azure.

To use it in a playbook, specify: netapp.azure.azure_rm_netapp_volume.

.. versionadded:: 19.10.0 of netapp.azure

  • Create and delete NetApp Azure volume.

The below requirements are needed on the host that executes this module.

  • python >= 2.7
  • azure >= 2.0.0
  • Python azure-mgmt. Install using 'pip install azure-mgmt'
  • Python azure-mgmt-netapp. Install using 'pip install azure-mgmt-netapp'
  • For authentication with Azure NetApp log in before you run your tasks or playbook with az login.
Parameter Choices/Defaults Comments
account_name
string / required
The name of the NetApp account.
file_path
string
A unique file path for the volume. Used when creating mount targets.
location
string
Resource location.
Required for create.
name
string / required
The name of the volume.
pool_name
string / required
The name of the capacity pool.
protocol_types
list / elements=string
added in 21.2.0 of netapp.azure
Protocol types - NFSv3, NFSv4.1, CIFS (for SMB).
resource_group
string / required
Name of the resource group.
service_level
string
    Choices:
  • Premium
  • Standard
  • Ultra
The service level of the file system.
default is Premium.
size
integer
added in 20.5.0 of netapp.azure
Provisioned size of the volume (in GiB).
Minimum size is 100 GiB. Upper limit is 100TiB
default is 100GiB.
state
string
    Choices:
  • present ←
  • absent
State present will check that the volume exists with the requested configuration.
State absent will delete the volume.
subnet_name
string
added in 21.1.0 of netapp.azure
Azure resource name for a delegated subnet. Must have the delegation Microsoft.NetApp/volumes.
Provide name of the subnet ID.
Required for create.

aliases: subnet_id
virtual_network
string
The name of the virtual network required for the subnet to create a volume.
Required for create.
vnet_resource_group_for_subnet
string
added in 20.5.0 of netapp.azure
Only required if virtual_network to be used is of different resource_group.
Name of the resource group for virtual_network and subnet_name to be used.

Note

  • The modules prefixed with azure_rm_netapp are built to support the Cloud Volume Services for Azure NetApp Files.
.. seealso::

   `Sign in with Azure CLI <https://docs.microsoft.com/en-us/cli/azure/authenticate-azure-cli?view=azure-cli-latest>`_
       How to authenticate using the ``az login`` command.

- name: Create Azure NetApp volume
  azure_rm_netapp_volume:
    resource_group: myResourceGroup
    account_name: tests-netapp
    pool_name: tests-pool
    name: tests-volume2
    location: eastus
    file_path: tests-volume2
    virtual_network: myVirtualNetwork
    vnet_resource_group_for_subnet: myVirtualNetworkResourceGroup
    subnet_name: test
    service_level: Ultra
    size: 100

- name: Delete Azure NetApp volume
  azure_rm_netapp_volume:
    state: absent
    resource_group: myResourceGroup
    account_name: tests-netapp
    pool_name: tests-pool
    name: tests-volume2

Common return values are documented :ref:`here <common_return_values>`, the following are the fields unique to this module:

Key Returned Description
mount_path
string
always
Returns mount_path of the Volume



Authors