purestorage.flasharray.purefa_host – Manage hosts on Pure Storage FlashArrays¶
Note
This plugin is part of the purestorage.flasharray collection (version 1.6.2).
To install it use: ansible-galaxy collection install purestorage.flasharray
.
To use it in a playbook, specify: purestorage.flasharray.purefa_host
.
New in version 1.0.0: of purestorage.flasharray
Requirements¶
The below requirements are needed on the host that executes this module.
python >= 2.7
purestorage >= 1.19
py-pure-client >= 1.6.0
netaddr
requests
Parameters¶
Notes¶
Note
If specifying
lun
option ensure host support requested valueThis module requires the
purestorage
Python libraryYou must set
PUREFA_URL
andPUREFA_API
environment variables if fa_url and api_token arguments are not passed to the module directly
Examples¶
- name: Create new AIX host
purefa_host:
name: foo
personality: aix
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Create 10 hosts with index starting at 10 but padded with 3 digits
purefa_host:
name: foo
personality: vms
suffix: bar
count: 10
start: 10
digits: 3
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: present
- name: Rename host foo to bar
purefa_host:
name: foo
rename: bar
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Delete host
purefa_host:
name: foo
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
state: absent
- name: Make host bar with wwn ports
purefa_host:
name: bar
protocol: fc
wwns:
- 00:00:00:00:00:00:00
- 11:11:11:11:11:11:11
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Make host bar with iSCSI ports
purefa_host:
name: bar
protocol: iscsi
iqn:
- iqn.1994-05.com.redhat:7d366003913
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Make host bar with NVMe ports
purefa_host:
name: bar
protocol: nvme
nqn:
- nqn.2014-08.com.vendor:nvme:nvm-subsystem-sn-d78432
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Make mixed protocol host
purefa_host:
name: bar
protocol: mixed
nqn:
- nqn.2014-08.com.vendor:nvme:nvm-subsystem-sn-d78432
iqn:
- iqn.1994-05.com.redhat:7d366003914
wwns:
- 00:00:00:00:00:00:01
- 11:11:11:11:11:11:12
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Map host foo to volume bar as LUN ID 12
purefa_host:
name: foo
volume: bar
lun: 12
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Disconnect volume bar from host foo
purefa_host:
name: foo
volume: bar
state: absent
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Add preferred arrays to host foo
purefa_host:
name: foo
preferred_array:
- array1
- array2
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Delete preferred arrays from host foo
purefa_host:
name: foo
preferred_array: delete
fa_url: 10.10.10.2
- name: Set CHAP target and host username/password pairs
purefa_host:
name: foo
target_user: user1
target_password: passwrodpassword
host_user: user2
host_password: passwrodpassword
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
- name: Delete CHAP target and host username/password pairs
purefa_host:
name: foo
target_user: user
target_password: clear
host_user: user
host_password: clear
fa_url: 10.10.10.2
api_token: e31060a7-21fc-e277-6240-25983c6c4592
Authors¶
Pure Storage Ansible Team (@sdodsley) <pure-ansible-team@purestorage.com>