Basic Getting Started with Ansible Modules for Dell Technologies PowerScale

Basic Getting Started with Ansible Modules for Dell Technologies PowerScale

Introduction

After working for more than two decades in the IT industry, I have gathered a wide range of technical skills and hands-on experience and I am eager to keep refining my skill set. My goal is to build upon my previous training and knowledge so I can compound each new learning opportunity. As a Senior PowerScale Technical Support Services Engineer, I saw an opportunity to combine my knowledge of PowerScale clusters with my desire to continue learning Ansible. By combining my existing background with fresh insights from recent courses, like the recently completed Red Hat’s “Ansible Basics: Automation Technical Overview (DO007) v2.0,” my goal is to accelerate my professional development and ultimately bridge the gap between my current expertise and my long-term career aspirations.

#IWork4Dell Note: This article is based solely on publicly available documentation, and I have worked through everything on my personal computer. (With the help of AI/GPT.) No proprietary or internal Dell information was accessed or used. References and resources are linked at the end for transparency.


Prerequisites

Dell PowerScale Environment: You need a running PowerScale cluster with OneFS. Make sure the OneFS REST API (also called Platform API or PAPI) is turned on. If you plan to use basic authentication, you might also need to run this command on the cluster:

isi_gconfig -t web-config auth_basic=true;        

Python SDK (isilon-sdk): The Ansible modules for Dell PowerScale depend on a Python library called isilon-sdk to talk to OneFS. You can install it like this:

pip install isilon-sdk;        

Ansible Modules for Dell PowerScale: These modules rely on the isilon-sdk Python bindings. The requirements.txt file shows that the only requirement is isilon-sdk. You can install the collection from Ansible Galaxy like this:

ansible-galaxy collection install dellemc.powerscale -p <install_path>        

Ansible Inventory Setup: You should list your PowerScale cluster in your Ansible inventory, or store these details in your playbook variables.

Supported Platforms: Dell PowerScale OneFS versions 9.4.x, 9.5.x, 9.7.x, and 9.8.x


Basic Ansible Knowledge It helps to know YAML, Ansible playbooks, and modules. Red Hat’s “Ansible Basics: Automation Technical Overview (DO007) v2.0” and their free Ansible tutorial are good resources.


Example Playbook: Gathering Cluster Information

Here is a short playbook that collects important details about your PowerScale cluster, such as the cluster owner, cluster identity, and email settings. This makes sure you know who owns the cluster, how it is labeled, and how it sends emails.

---
- name: Gather cluster owner, cluster identity, and email settings
  hosts: powerscale
  collections:
    - dellemc.powerscale

  vars:
    onefs_host: "192.168.1.100"   # Replace with your cluster hostname or IP
    api_user: "admin"                   # Your admin username
    api_password: "password"     # Your admin password
    verify_ssl: false                       # Turn this true if you want certificate checks

  tasks:
    - name: Collect cluster details
      dellemc.powerscale.info:
        onefs_host: "{{ onefs_host }}"
        api_user: "{{ api_user }}"
        api_password: "{{ api_password }}"
        verify_ssl: "{{ verify_ssl }}"
        gather_subset:
          - cluster_owner
          - cluster_identity
          - email_settings
      register: cluster_details

    - name: Show cluster owner info
      debug:
        var: cluster_details.cluster_owner

    - name: Show cluster identity info
      debug:
        var: cluster_details.cluster_identity

    - name: Show email settings
      debug:
        var: cluster_details.email_settings
        

What Happens Here?

  1. vars Stores your cluster's connection info and login details. You can hide passwords by using a secure Ansible method, like Ansible Vault.
  2. dellemc.powerscale.info A module that reads data from your cluster. The gather_subset part tells it which pieces of data you want.
  3. register: cluster_details Saves the data in cluster_details. You can use it in other tasks to do checks, store logs, or create reports.
  4. debug Tasks Prints the data that was collected. This is good for testing or making sure the output is correct before doing more tasks.


How to Run the Playbook

Once you have saved the playbook (for example, as gather_cluster_info.yml) and set up your Ansible inventory, you can run the playbook with the following command:

ansible-playbook -i /path/to/your/inventory gather_cluster_info.yml        

Replace /path/to/your/inventory with the path to your Ansible inventory file if it's not in the default location. This command tells Ansible to execute the tasks in gather_cluster_info.yml against the hosts defined in your inventory, which in this case should include your PowerScale cluster.

Node-Level Details

If you need information on a specific node (like Node 1) in your PowerScale cluster, you can use the dellemc.powerscale.node module. Here is a quick example:

---
- name: Gather node information from PowerScale
  hosts: localhost
  connection: local
  vars:
    onefs_host: '10.**.**.157'
    verify_ssl: false
    api_user: 'user'
    api_password: 'Password'
    node_id: '1'

  tasks:
    - name: Get node info of the PowerScale cluster node
      dellemc.powerscale.node:
        onefs_host: "{{ onefs_host }}"
        verify_ssl: "{{ verify_ssl }}"
        api_user: "{{ api_user }}"
        api_password: "{{ api_password }}"
        node_id: "{{ node_id }}"
        state: "present"
        

  • node_id tells Ansible which node to check.
  • dellemc.powerscale.node can read or set the node’s state.
  • hosts: localhost and connection: local mean the playbook uses API calls instead of SSH.


Best Practices and Next Steps

  1. Keep Credentials Safe Do not put passwords in plain text. Use Ansible Vault or another secret storage system.
  2. Combine Multiple Modules The Dell PowerScale Ansible collection includes modules for NFS, SMB shares, SyncIQ, and more. You can mix them to manage different parts of your cluster.
  3. Store Task Results You can gather information with register and use it in later steps. This makes your playbooks more flexible and powerful.
  4. Learn More Stay curious. Red Hat has official courses, and there are many online communities with tutorials and tips about Ansible and PowerScale. Trying new ideas and testing them is the best way to learn.
  5. Explore the SDK The Isilon SDK repo has tools for many programming languages, not just Python. If you want to do custom scripting or build extra features, you can learn more there.


References and Resources



(I will keep adding more links if I discover new resources.)

Congratulations on your article! Your insights on Ansible and Dell PowerScale will be valuable for many in the tech community.

Like
Reply

To view or add a comment, sign in

More articles by Joseph Tracy

Others also viewed

Explore content categories