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
Recommended by LinkedIn
What Happens Here?
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"
Best Practices and Next Steps
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.