Unsolved
2 Posts
0
413
October 14th, 2020 13:00
ansible-unity/dellemc_unity_volume does not appear to support a list for host_name
The host_name/host_id parameter of dellemc_unity_volume does not appear to support lists.
As a result, in order to add multiple hosts to a lun, multiple runs of dellemc_unity_volume are required:
- hosts: unityhostname connection: local gather_facts: no vars: esx_hosts: - ESX01 - ESX02 roles: - name: Create volume dellemc_unity_volume: username: "{ { unity_username }}" password: "{ { unity_password }}" unispherehost: "{ { unisphere_host }}" vol_name: my_volume pool_name: my_pool size: 1 cap_unit: TB compression: yes is_thin: yes host_name: "{ { item }}" mapping_state: mapped state: present register: volume_info loop: "{ { esx_hosts }}"
It would be nice if the module supported either a list for host_name/host_id, or a parameter called 'host_access' that would look something like this:
- dellemc_unity_volume: host_access: - host: ESX01 accessMask: HostLUNAccessEnum.PRODUCTION hlu: 255
This should enable a call directly to obj_vol.modify(host_access=host_access) or obj_vol.update_hosts() if you want to try to avoid unecessary calls to the API. Ideally, accessMask and hlu should be optional as they are either set to a default value or None in the lower level libraries.
Do you support pull requests to https://github.com/dell/ansible-unity? If not, is this the appropriate place for a feature request?