huawei.enterprise.hw_enterprise_dns_server module – DNS Server 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_dns_server.

Synopsis

  • modify and get the detail of a DNS Server

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

address

string

DNS server address list.

Maximum three IPv4 or IPv6 addresses are supported.

custom_vars

dictionary

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.

filter

list / elements=string

Parameter required for all query operations.

The response will include the storage parameters that match the indicate filter criteria.

Choices:

  • "tenancy_id"

  • "address"

  • "type"

hostname

string / required

IP or FQDN of the huawei enterprise management system.

MultiIP config as ip1,ip2

password

string / required

The password of the PowerStore host.

socket_timeout

integer

Huawei Enterprise Storage rest api Timeout time.

Default: 60

state

string / required

Define whether the DNS Server should exist or not.

Choices:

  • "present"

  • "absent"

storage_port

integer

Port number for the Huawei Enterprise array.

If not passed, it will take 8088 as default.

Default: 8088

use_log

boolean

Whether to write plugin log to local filesystem.

Choices:

  • false ← (default)

  • true

username

string / required

The username of the PowerStore host.

valid_certs

string

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: Modify DNS Server
    register: dns_info
    huawei.enterprise.hw_enterprise_dns_server:
      hostname: "{{ hostname }}"
      username: "{{ username }}"
      password: "{{ password }}"
      valid_certs: "{{ valid_certs }}"
      socket_timeout: "{{ socket_timeout }}"
      storage_port: "{{ storage_port }}"
      use_log: "{{ use_log }}"
      address: "< address1 , address2 >"
      state: "present"

  - name: Get DNS Server
    register: dns_info
    huawei.enterprise.hw_enterprise_dns_server:
      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:
        - tenancy_id
        - address
        - type

Return Values

Common return values are documented here, the following are the fields unique to this module:

Key

Description

actions

list / elements=string

playbook action lists

Returned: always

Sample: ["modify"]

changed

boolean

Whether or not the resource has changed.

Returned: always

Sample: false

dns_detail

complex

Details of the DNS Server.

Returned: When DNS Server exists

Sample: {"address": "192.168.6.6", "tenancy_id": "0", "type": "260"}

address

string

DNS server address list.

Returned: success

tenancy_id

string

vStore ID.

Returned: success

type

string

Type number of the object.

Returned: success

remark

string

task execute remark

Returned: always

Sample: "sample_dns_server modify success"

Authors

  • Huawei eSDK Ansible Team