everpure.flasharray.purefa_server module – Manage Everpure FlashArray file servers
Note
This module is part of the everpure.flasharray collection (version 1.46.0).
You might already have this collection installed if you are using the ansible package.
It is not included in ansible-core.
To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install everpure.flasharray.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: everpure.flasharray.purefa_server.
New in everpure.flasharray 1.45.0
Synopsis
Create, rename, reconfigure and delete file servers on Everpure FlashArrays.
A file server is the identity a FlashArray presents its file protocols through. It ties together the DNS configuration used to resolve and publish the server, and the directory service the server authenticates against.
The objects a file server serves are managed by their own modules - everpure.flasharray.purefa_fs for file systems, everpure.flasharray.purefa_directory for managed directories, everpure.flasharray.purefa_export for exports and everpure.flasharray.purefa_policy for the NFS, SMB and snapshot policies applied to them.
The DNS and directory service configurations a file server refers to are managed by everpure.flasharray.purefa_dns and everpure.flasharray.purefa_ds.
Requirements
The below requirements are needed on the host that executes this module.
python >= 3.3
purestorage >= 1.19
py-pure-client >= 1.88.0
netaddr
requests
pycountry
urllib3
Parameters
Parameter |
Comments |
|---|---|
FlashArray API token for admin privileged user. |
|
Resource types to delete along with the file server, for objects that would otherwise block its deletion.
This does not remove a local directory service created for the server, which outlives it and has to be deleted separately. Only applies when state=absent. |
|
ID of the API Client that issues the identity token. Used with private_key_file. |
|
Name of fleet member on which to perform the operation. This requires the array receiving the request is a member of a fleet and the context name to be a member of the same fleet. Default: |
|
Name of a local directory service for the array to create and associate with the file server. Only applies when the file server is created. Ignored for a file server that already exists. Mutually exclusive with local_directory_service. |
|
Name of the directory service configuration the file server authenticates against, as managed by everpure.flasharray.purefa_ds. This is a directory service the file server can see. The array’s own Set to an empty string to detach the current directory service. |
|
Disable insecure certificate warnings in debug logs Choices:
|
|
Name of the DNS configuration the file server uses. This is a DNS configuration created by everpure.flasharray.purefa_dns, either the one with service=file or one created without a service. Each file server needs a configuration of its own, so only the first can take the A new file server is given the array’s management DNS configuration by default, so this is for moving one onto a DNS configuration of its own. Set to an empty string to detach the current DNS configuration. Not enough on its own to create a file server. See directory_service. |
|
FlashArray management IPv4 address or Hostname. |
|
A pre-signed JWT to authenticate with, as an alternative to api_token. The token is exchanged by the array for a short-lived access token. Requires a matching API Client to be registered on the array (see everpure.flasharray.purefa_apiclient). |
|
The API Client’s trusted identity issuer registered on the array. Used with private_key_file. |
|
Key ID of the API Client that issues the identity token. Used with private_key_file. |
|
Name of an existing local directory service to associate with the file server. A local directory service belongs to one file server at a time, so this fails if another file server already has it. Mutually exclusive with create_local_directory_service. |
|
Name of the file server. |
|
Names of the network interfaces the file server is reachable on, such as the file VIFs created by everpure.flasharray.purefa_network. Declarative. Interfaces in the list that are not attached to this file server are attached, and interfaces attached to it that are not in the list are detached. An empty list detaches all of them. Omit the option to leave the file server’s interfaces alone. Detaching an interface stops clients reaching the file server through it, so this only ever acts on a task that names the interfaces explicitly. An interface can be attached to one file server at a time. |
|
Path to the PEM RSA private key used to sign an identity token, as an alternative to api_token. Requires client_id, key_id, issuer and username. |
|
Password protecting private_key_file, if encrypted. |
|
Value to rename the specified file server to. |
|
Define whether the file server should exist or not. Choices:
|
|
Username the issued token should be granted to. Must be a valid user on the array. Used with private_key_file. |
Notes
Note
Requires Purity//FA REST API 2.44 or higher, which is where file servers first appear.
A file server cannot be created from a name alone. One of directory_service, local_directory_service or create_local_directory_service is required.
This module requires the
py-pure-clientPython library.Additional Python libraries may be required for specific modules.
You must set
PUREFA_URLandPUREFA_APIenvironment variables if fa_url and api_token arguments are not passed to the module directly.Token-based authentication (id_token, or private_key_file with client_id, key_id, issuer and username) may be used as an alternative to api_token, and requires a matching API Client registered on the array via everpure.flasharray.purefa_apiclient.
Examples
- name: Create file server the way the GUI does - network, DNS and directory service
everpure.flasharray.purefa_server:
name: filesvr1
dns: filesvr1-dns
create_local_directory_service: filesvr1-lds
network_interfaces:
- filevif1
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Create file server joined to an existing directory service
everpure.flasharray.purefa_server:
name: filesvr2
directory_service: filesvr2-ds
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Move an existing file server onto a different DNS configuration
everpure.flasharray.purefa_server:
name: filesvr2
dns: new-dns
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Detach the directory service from a file server
everpure.flasharray.purefa_server:
name: filesvr2
directory_service: ""
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Rename file server
everpure.flasharray.purefa_server:
name: filesvr2
rename: filesvr3
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Delete file server, along with the directory services only it uses
everpure.flasharray.purefa_server:
name: filesvr1
cascade_delete:
- directory-services
state: absent
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592