This blog is the continuation of Ansible with DellEMC storage multi-part blog.
In Part 1 of this series, we discussed getting started with the installation of dependencies for the Ansible and DellEMC Ansible module, followed by Ansible installation.
In Part 2 we discussed the high-level basics of Ansible to get you started quickly.
The purpose of earlier blogs was to get you to familiarize yourself with Ansible. In this blog, we will talk about DellEMC PowerMax Ansible module.
First let’s get our management server ready. Make sure following pre-requisites are in place
- PowerMax is running with Unisphere 9.0
- Red Hat Enterprise Linux 7.5 (or equivalent). CentOS in my case
- Ansible is installed (min version 2.6)
- Python 2.7.12 or higher is installed
- Python library for Unisphere (PyU4V) 184.108.40.206 is installed
Ansible relies on Python and the Ansible for PowerMax modules rely on the PyU4V Python library. Check this link for more details on the latest PyU4V module.
Make sure that Python and “pip” are installed. pip is a Python package manager. Install “pip” if required and then use it to install PyU4V.
Below commands will get pip and PyU4V installed.
# python -V # pip -V # yum install python-pip # pip install PyU4V
Once the system is ready with required packages next step is to get the PowerMax module from GitHub. To get the modules run below commands.
# git clone https://github.com/dell/ansible-powermax # cd dellemc_ansible # ls
This folder (
dellemc_ansible) contains multiple documents including “
Product Guide” and “
Release Notes” for the downloaded version.
We also need to copy a few files from downloaded modules to Ansible directories. Follow below process to complete the copy operation
# cp utils/* /usr/lib/python2.7/site-packages/ansible/module_utils/ # mkdir /usr/lib/python2.7/site-packages/ansible/modules/storage/dellemc/ # cd /powermax/library # ls # cp * /usr/lib/python2.7/site-packages/ansible/modules/storage/dellemc/
You’ll get an error in case of
dellemc directory already exists, which you can ignore.
At this point, we are ready with an Ansible server with DellEMC PowerMax modules installed.
There are multiple files in the downloaded directory, each for different management tasks of DellEMC PowerMax (SRP, Volumes, Masking, etc.). We’ll discuss each module in the next blog post in this series.