Git Product home page Git Product logo

ibm.ds8000's Introduction

IBM DS8000 Collection for Ansible

CI Codecov Code style: black

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 Ansible

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.

Python Requirements

This collection supports Python versions >=3.6 as required by pyds8k.

External requirements

Name Minimum Version
pyds8k v1.4.0
IBM DS8000® family 8.x and higher with same API interface

Included content

Modules

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

Idempotency

Modules are idempotent except where noted.

Using this collection

Installing the Collection from Ansible Galaxy

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

Configuring Trusted Communication

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.

  1. 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'
  2. Find the location of the trust store file used by requests:

    python -c "import requests;print(requests.certs.where())"
  3. 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.

Example Playbook

---
- 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.

Contributing to this collection

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.

Code Style

Code style: black

Arguments

  --line-length=160
  --skip-string-normalization

Release notes

See the changelog.

More information

Licensing

Apache License, Version 2.0

See LICENSE to see the full text.

ibm.ds8000's People

Contributors

njm3mjy5nzagnza3mza3 avatar matancarmeli7 avatar andersson007 avatar gundalow avatar blearandy avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.