What’s New with Ansible Collection for PowerMax Version 1.7
Mon, 25 Apr 2022 14:39:01 -0000
|Read Time: 0 minutes
Ansible Modules for Dell PowerMax help automate and orchestrate the configuration and management of Dell PowerMax arrays. Specifically, they are used for managing volumes, storage groups, ports, port groups, host, host groups, masking views, initiators, SRDF links, RDF groups, snapshots, job, snapshot policies, storage pools, role for automatic volume provisioning, and Metro DR environments for PowerMax arrays. The modules use playbooks to list, show, create, delete, and modify each of the entities.
Ansible Modules for Dell PowerMax support the following features:
- Create volumes, storage groups, hosts, host groups, port groups, masking views, Metro DR environments, snapshot policies, and snapshots of a storage group.
- Modify volumes, storage groups, hosts, host groups, Metro DR environments, snapshot policies, initiators and port groups in the array.
- Delete volumes, storage groups, hosts, host groups, port groups, masking views, Metro DR environments, snapshot policies, and snapshots of a storage group.
- Get details of volumes, storage groups, hosts, host groups, port, port groups, masking views, Metro DR environments, Job, RDF groups, snapshot policies, storage pools, initiators, and snapshots of a storage group.
Each quarter we are improving our Ansible collections and modules for our storage platforms. This quarter sees the release of version 1.7 of the Ansible Collection for PowerMax available on GitHub and Ansible Galaxy. This blog highlights a few major changes in Version 1.7, and a few minor ones too. Full release notes are here.
Module name changes
To start off, there have been some naming changes to the Ansible modules. In previous releases, the modules were handed a very long name with dellemc_powermax_<function>. This made sense when modules were installed standalone. However with the advent of collections, if the user followed Ansible best practices and used the Fully Qualified Collection Name (FCQN) when referencing the modules in playbooks, the name became redundant and quite long.
For example, with Ansible collection for PowerMax <=1.6.x, calling the modules in a playbook would look like this:
tasks: - name: Create Storage group dellemc.powermax.dellemc_powermax_storagegroup: <<: *uni_connection_vars sg_name: "{{ sg_name }}" service_level: "Diamond" state: 'present'
With Ansible Modules for PowerMax 1.7 and higher, the new syntax is shorter:
tasks: - name: Create Storage group dellemc.powermax.storagegroup: <<: *uni_connection_vars sg_name: "{{ sg_name }}" service_level: "Diamond" state: 'present'
The name changes have been made in such a way that upgrading will not affect your existing playbooks for some time. Redirection has been implemented so that existing playbooks continue to work exactly as before, but you’ll get a warning message if you use the older names, as shown here:
(You won’t see this message if you have turned off deprecation warnings in your ansible.cfg file.)
The warning states that you have two years to update playbooks to use the new naming conventions, so there’s plenty of time!
Another naming change is the dellemc_powermax_gather_facts module. This has been renamed to info, in line with what other vendors are doing, and with current Ansible standards. All existing functionality remains. If the old name is used in a playbook, redirection yields a similar deprecation warning.
New initiator module
PowerMax customers have historically used initiator aliases for host WWNs to make management tasks easier. From the UI, it is easy to see which HBA belongs to which host when listing all initiators. Some of our customers have asked for the ability to set these aliases in the Ansible management suite. The initiator module allows us to do just that.
The new module lets you get initiator details using a WWN or an alias, and to rename the initiator alias using either the alias or the WWN. Some example tasks are shown here:
- name: Get initiator details using initiator WWN dellemc.powermax.initiator: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" serial_no: "{{serial_no}}" initiator_id: 1000000000000001 state: 'present' - name: Get initiator details using alias dellemc.powermax.initiator: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" serial_no: "{{serial_no}}" alias: 'test/host_initiator' state: 'present' - name: Rename initiator alias using initiator id dellemc.powermax.initiator: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" serial_no: "{{serial_no}}" initiator_id: 1000000000000001 new_alias: new_node_name: 'test_rename' new_port_name: 'host_initiator_rename' state: 'present' - name: Rename initiator alias using alias dellemc.powermax.initiator: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" serial_no: "{{serial_no}}" alias: 'test/host_initiator' new_alias: new_node_name: 'test_rename' new_port_name: 'host_initiator_rename' state: 'present'
The host module has also been updated with this release, making it possible for you to modify a host initiator by either WWN or Host Alias, as shown here:
- name: Create host with host_flags dellemc.powermax.host: unispherehost: "{{unispherehost}}" universion: "{{universion}}" verifycert: "{{verifycert}}" user: "{{user}}" password: "{{password}}" serial_no: "{{serial_no}}" host_name: "VMWARE_HOST1" initiators: - 1000000000000001 - 'VMWARE_HOST1/VMHBA1' host_type: default state: 'present' initiator_state: 'present-in-host'
If you run into any issues or need assistance, the GitHub Issues tracking section has been opened to the world. You can also request new features, report problems, seek assistance from the Dell Technologies engineering team here, and see where other customers have commented about their own experiences.
I hope you found this information useful! Check back on our Info Hub site regularly for more updates about our products and services.
Author: Paul Martin, Senior Principal Technical Marketing Engineer
Twitter: @rawstorage