huawei.enterprise.hw_enterprise_usm_user module – Usm user operations for Huawei Enterprise Storage
Note
This module is part of the huawei.enterprise collection (version 2.0.0).
It is not included in ansible-core.
To check whether it is installed, run ansible-galaxy collection list.
To install it, use: ansible-galaxy collection install huawei.enterprise.
You need further requirements to be able to use this module,
see Requirements for details.
To use it in a playbook, specify: huawei.enterprise.hw_enterprise_usm_user.
Synopsis
Supports the provisioning operations on a Usm user such as create, modify, delete and get the details of a Usm user.
Requirements
The below requirements are needed on the host that executes this module.
Huawei Dorado v5/v6/v7 and OceanStor v5/v6/v7 Storage
Parameters
Parameter |
Comments |
|---|---|
Authentication protocol type, create operation is required, while modification operation is optional. Choices:
|
|
Authentication password. This field must be delivered when the value of cmo_usm_auth_prot is not “none”. |
|
Data encryption password. This field must be delivered when the value of cmo_usm_priv_prot is not “none”. |
|
Data encryption protocol type, create operation is required, while modification operation is optional. Choices:
|
|
Usm user unique name, create operation is required, while modification operation is optional. Mutually exclusive with id. |
|
User level, create operation is required, while modification operation is optional. Choices:
|
|
Parameters used to extend those not currently supported by the module. Configuration needs to be based on the REST API documentation for storage. If necessary, you can contact the plugin technical support for assistance. |
|
Parameter required for all query operations. The response will include the storage parameters that match the indicate filter criteria. Choices:
|
|
IP or FQDN of the huawei enterprise management system. MultiIP config as ip1,ip2 |
|
Usm user unique id, Mutually exclusive with “name”, Priority is higher than name. |
|
The password of the PowerStore host. |
|
Huawei Enterprise Storage rest api Timeout time. Default: |
|
Define whether the Usm user should exist or not. Choices:
|
|
Port number for the Huawei Enterprise array. If not passed, it will take 8088 as default. Default: |
|
Type number of the managed object, Required for create operation. Choices:
|
|
Whether to write plugin log to local filesystem. Choices:
|
|
The username of the PowerStore host. |
|
The path of the SSL certificate variable to specify whether to validate SSL certificate or not. If don’t set means no need to verify ssl cert. |
Notes
Note
The check_mode is not supported.
The modules present in this collection named as ‘huawei.enterprise’ are built to support the Huawei Enterprise Storage System.
Examples
---
tasks:
- name: Create Usm User
register: usm_user_info
huawei.enterprise.hw_enterprise_usm_user:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
cmo_usm_auth_prot: "< md5 | none | sha | sha224 | sha256 | sha384 | sha512 >"
cmo_usm_priv_prot: "< none | des | 3des | aes128 | aes192 | aes256 >"
cmo_usm_user: "< cmo_usm_user >"
cmo_usm_passwd: "{{ cmo_usm_passwd }}"
cmo_usm_priv_passwd: "{{ cmo_usm_priv_passwd }}"
cmo_usm_user_level: "< read_and_write | read_only >"
type: "snmp_usm"
state: "present"
- name: Modify Usm User By Id
register: usm_user_info
huawei.enterprise.hw_enterprise_usm_user:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "{{ usm_user_info.usm_user_detail.id }}"
cmo_usm_auth_prot: "< md5 | none | sha | sha224 | sha256 | sha384 | sha512 >"
cmo_usm_priv_prot: "< none | des | 3des | aes128 | aes192 | aes256 >"
cmo_usm_passwd: "{{ cmo_usm_passwd }}"
cmo_usm_priv_passwd: "{{ cmo_usm_priv_passwd }}"
cmo_usm_user_level: "< read_and_write | read_only >"
state: "present"
- name: Query Multi Usm User
register: usm_user_info
huawei.enterprise.hw_enterprise_usm_user:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
state: "present"
filter:
- type
- id
- cmo_usm_auth_prot
- cmo_usm_is_default
- cmo_usm_priv_prot
- cmo_usm_user
- cmo_usm_user_level
- name: Get Usm User By Id
register: usm_user_info
huawei.enterprise.hw_enterprise_usm_user:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "{{ usm_user_info.usm_user_detail.id }}"
state: "present"
filter:
- type
- id
- cmo_usm_auth_prot
- cmo_usm_is_default
- cmo_usm_priv_prot
- cmo_usm_user
- cmo_usm_user_level
- name: Delete Usm User By Id
huawei.enterprise.hw_enterprise_usm_user:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
id: "{{ usm_user_info.usm_user_detail.id }}"
state: "absent"
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key |
Description |
|---|---|
playbook action lists Returned: always Sample: |
|
Whether or not the resource has changed. Returned: always Sample: |
|
task execute remark Returned: always Sample: |
|
Details of the Usm User. Returned: When Usm User exists Sample: |
|
Authentication protocol type. Returned: always |
|
Whether the USM user is a default user. Returned: always |
|
Authentication protocol type. Returned: always |
|
Name of the Usm User. Returned: always |
|
User level. Returned: always |
|
The system generated ID given to the Usm User. Returned: always |