purestorage.flashblade.purefb_ds module – Configure FlashBlade Directory Service
Note
This module is part of the purestorage.flashblade collection (version 1.26.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 purestorage.flashblade.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: purestorage.flashblade.purefb_ds.
New in purestorage.flashblade 1.0.0
Synopsis
Create, modify or erase directory services configurations. There is no facility to SSL certificates at this time. Use the FlashBlade GUI for this additional configuration work.
If updating a directory service and i(bind_password) is provided this will always cause a change, even if the password given isn’t different from the current. This makes this part of the module non-idempotent..
Requirements
The below requirements are needed on the host that executes this module.
python >= 3.9
py-pure-client
netaddr
datetime
pytz
distro
pycountry
urllib3
Parameters
Parameter |
Comments |
|---|---|
FlashBlade API token for admin privileged user. |
|
Sets the base of the Distinguished Name (DN) of the directory service groups. The base should consist of only Domain Components (DCs). The base_dn will populate with a default value when a URI is entered by parsing domain components from the URI. The base DN should specify DC= for each domain component and multiple DCs should be separated by commas. |
|
Sets the password of the bind_user user name account. |
|
Sets the user name that can be used to bind to and query the directory. For Active Directory, enter the username - often referred to as sAMAccountName or User Logon Name - of the account that is used to perform directory lookups. For OpenLDAP, enter the full DN of the user. |
|
ID of the API Client that issues the identity token. Used with private_key_file. |
|
Disable insecure certificate warnings Choices:
|
|
The type of directory service to work on Choices:
|
|
Whether to enable or disable directory service support. Choices:
|
|
FlashBlade management IP address or Hostname. |
|
Will force the bind password to be reset even if the bind user password is unchanged. If set to false and bind_user is unchanged the password will not be reset. Choices:
|
|
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 purestorage.flashblade.purefb_apiclient). |
|
The API Client’s trusted identity issuer registered on the array. Used with private_key_file. |
|
The optional organizational unit (OU) where the machine account for the directory service will be created. |
|
Key ID of the API Client that issues the identity token. Used with private_key_file. |
|
Name of the internal server Only required if nfs is the dstype |
|
The NIS domain to search This cannot be used in conjunction with LDAP configurations. |
|
A list of up to 30 IP addresses or FQDNs for NIS servers. This cannot be used in conjunction with LDAP configurations. |
|
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. |
|
Create, delete or test directory service configuration Choices:
|
|
A list of up to 30 URIs of the directory servers. Each URI must include the scheme ldap:// or ldaps:// (for LDAP over SSL), a hostname, and a domain name or IP address. For example, ldap://ad.company.com configures the directory service with the hostname “ad” in the domain “company.com” while specifying the unencrypted LDAP protocol. |
|
Username the issued token should be granted to. Must be a valid user on the array. Used with private_key_file. |
Notes
Note
You must set
PUREFB_URLandPUREFB_APIenvironment variables if fb_url and api_token arguments are not passed to the module directlyToken-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 purestorage.flashblade.purefb_apiclient
Examples
- name: Delete existing management directory service
purestorage.flashblade.purefb_ds:
dstype: management
state: absent
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Create NFS directory service (disabled)
purestorage.flashblade.purefb_ds:
dstype: nfs
uri: "ldaps://lab.purestorage.com"
base_dn: "DC=lab,DC=purestorage,DC=com"
bind_user: Administrator
bind_password: password
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Enable existing SMB directory service
purestorage.flashblade.purefb_ds:
dstypr: smb
enable: true
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Disable existing management directory service
purestorage.flashblade.purefb_ds:
dstype: management
enable: false
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Create NFS directory service (LDAP-based) - default internal server
purestorage.flashblade.purefb_ds:
dstype: nfs
enable: true
uri: "ldaps://lab.purestorage.com"
base_dn: "DC=lab,DC=purestorage,DC=com"
bind_user: Administrator
bind_password: password
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Create NFS directory service (NIS based) - alternate internal server
purestorage.flashblade.purefb_ds:
dstype: nfs
nfs_server: acme1
enable: true
nis_domain: "acme.com"
nis_servers:
- "1.1.1.1"
- "2.2.2.2"
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Test array management directory service
purestorage.flashblade.purefb_ds:
dstype: management
state: test
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Test default nfs directory service
purestorage.flashblade.purefb_ds:
dstype: nfs
state: test
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641
- name: Test NFS directory service for internal server fred
purestorage.flashblade.purefb_ds:
dstype: nfs
nfs_server: fred
state: test
fb_url: 10.10.10.2
api_token: T-55a68eb5-c785-4720-a2ca-8b03903bf641