Skip to content

IBM/ansible-storage-protect

Repository files navigation

ibm.storage_protect

Description

NOTE: This collection is under development

This collection provides a series of Ansible modules and plugins to help automate the deployment and configuration of a Storage Protect landscape comprising of multiple Storage Protect servers and clients. It can be used to automate perform simple data protection operations such as backup / restore, archive / retrieve - of the data or workloads supported by the IBM Storage Protect product. You can also automate the overall data protection governance for the enterprise, using policy-based data management. For more information regarding this product, see IBM Documentation.

Requirements

Ansible version compatibility

This collection has been tested against following Ansible versions: >=2.15.0.

Python

Collection supports 3.9+

IBM Storage Protect

This collection supports IBM Storage Protect versions >= 8.1.23. The Storage Protect Client (including dsmadmc CLI) must be pre-installed in the target client-node for schedule,node,oc_configure,sp_server_facts and storage_agent modules. Refer to IBM documentation for more details

Installation

Before using this collection, you need to install it with the Ansible Galaxy command-line tool:

ansible-galaxy collection install ibm.storage_protect

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

Note that if you install any collections from Ansible Galaxy, they 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.storage_protect --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 1.0.0:

ansible-galaxy collection install ibm.storage_protect:==1.0.0

See using Ansible collections for more details.

🔧 Note on Python Version Requirement

Some Ansible collections (including baclient-installation) require Python 3.9 or higher on the remote hosts. If your target systems (e.g. RHEL 8) are using an older Python version (like 3.6), the collection will fail due to incompatibility.

To address this without modifying the collection code, you can use the python_version_install.yml playbook to automatically install Python 3.9+ from source on the remote host. After installation, you can instruct Ansible to use the new Python interpreter for all tasks.

Use Cases

Preparing Storage Protect client system-option file

You can use the following example code:

- name: Create dsm.sys
  ibm.storage_protect.dsm_sysfile:
    server_name: "ibmsp01"
    tcp_server_address: "10.10.10.10"

Setting up the Storage Protect landscape

The modules in this collection are used to setup a Storage Protect landscape comprising of multiple Storage Protect server instance and multiple Storage Protect client nodes. Here is an example of adding or registering an existing client node, to an existing Storage Protect server instance.

The following task will do this:

- name: Register hosts
  ibm.storage_protect.node:
    node: ibmsp01
    policy_domain: STANDARD
    schedules:
      - my_sched
    node_password: P@ssword123456789
    session_security: strict
    node_password_expiry: 90
    can_archive_delete: true
    min_extent_size: 250
    state: present
    server_name: "{{ ibmsp_host }}"
    username: "{{ ibmsp_username }}"
    password: "{{ ibmsp_password }}"

Testing

The tests directory contains configuration for running sanity and integration tests using ansible-test.

License Information

Apache License, Version 2.0

See LICENSE to see the full text.

About

Ansible collection for IBM Storage Protect

Resources

Contributing

Security policy

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages