This collection provides a series of Ansible modules and plugins for interacting with the IBM DS8000 family storage products. For more information regarding these products, see IBM Documentation.
Tested with the current Ansible 2.9, 2.10, 2.11, 2.12 releases and the current development version of Ansible. Ansible versions before 2.9.10 are not supported.
This collection supports Python versions >=3.6 as required by pyds8k.
Name | Minimum Version |
---|---|
pyds8k | v1.4.0 |
IBM DS8000® family | 8.x and higher with same API interface |
Name | Description |
---|---|
ds8000_host_port | Manage host ports for a DS8000 host |
ds8000_host_port_info | Return info on DS8000 host ports |
ds8000_host | Manage DS8000 hosts |
ds8000_host_info | Return info on DS8000 hosts |
ds8000_lss_info | Return info on DS8000 lsses |
ds8000_marray_info | Return info on DS8000 managed arrays |
ds8000_pool_info | Return info on DS8000 pools |
ds8000_volume_info | Return basic info on DS8000 volumes |
ds8000_volume_mapping | Manage DS8000 volume mapping to hosts |
ds8000_volume | Manage DS8000 volumes |
ds8000_lss | Manage DS8000 lsses |
Modules are idempotent except where noted.
Before using this collection, you need to install it with the Ansible Galaxy command-line tool:
ansible-galaxy collection install ibm.ds8000
You can also include it in a requirements.yml
file and install it with ansible-galaxy collection install -r requirements.yml
, using the format:
---
collections:
- name: ibm.ds8000
Note that if you install the collection from Ansible Galaxy, it will not be upgraded automatically when you upgrade the ansible
package. To upgrade the collection to the latest available version, run the following command:
ansible-galaxy collection install ibm.ds8000 --upgrade
You can also install a specific version of the collection, for example, if you need to downgrade when something is broken in the latest version (please report an issue in this repository). Use the following syntax to install version 0.1.0
:
ansible-galaxy collection install ibm.ds8000:==0.1.0
Trusted communication with the IBM DS8000 over HTTPS is controlled by the collection variable validate_certs
. The default yes
validates the SSL chain of trust. To complete the chain of trust, the public certificates for the certificate authorities whom signed the IBM DS8000 Communications Certificate must be added to the trust store. This collection uses the Python library pyds8k, which uses the requests library whom uses certifi.
-
Find the version of python used by ansible (using jq to parse the json output):
ansible localhost -m ansible.builtin.setup | sed '1c {' | jq '.ansible_facts.ansible_python.executable'
-
Find the location of the trust store file used by requests:
python -c "import requests;print(requests.certs.where())"
-
Append the CA certificate (in PEM format) to the certifi trust store file:
cat ca_public_certificate.pem >> /usr/local/lib/python3.6/site-packages/certifi/cacert.pem
To disable validation, set the collection variable validate_certs=no
.
---
- name: Using the IBM DS8000 collection
hosts: localhost
# Define common module parameters
module_defaults:
# ansible-core < 2.11 - define for each module
# ibm.ds8000.ds8000_volume:
# ansible-core >= 2.12 - use module defaults group for all modules
group/ibm.ds8000.ds8000:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
validate_certs: no
tasks:
- name: Create fb volume
ibm.ds8000.ds8000_volume:
name: ansible
state: present
pool: P0
capacity: "1"
register: create
- name: Delete fb volume
ibm.ds8000.ds8000_volume:
volume_id: "{{ item.id }} "
state: absent
with_items: "{{ create.volumes }}"
See Ansible Using collections for more details.
Currently we are not accepting community contributions. Though, you may periodically review this content to learn when and how contributions can be made in the future.
Arguments
--line-length=160
--skip-string-normalization
See the changelog.
- Ansible Collection overview
- Ansible User guide
- Ansible Developer guide
- Ansible Collections Checklist
- Ansible Community code of conduct
- The Bullhorn (the Ansible Contributor newsletter)
- Changes impacting Contributors
- IBM Documentation
Apache License, Version 2.0
See LICENSE to see the full text.