huawei.enterprise.hw_enterprise_ntp_server module – NTP 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_ntp_server.
Synopsis
modify and get the detail of a NTP 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 |
|---|---|
NTP authentication status. The NTP version needs to be NTPv4 (included) or later. Choices:
|
|
NTP server address. The value can be a domain name or an IPv4 or IPv6 address. A maximum of two addresses can be configured for an NTP server. The addresses are separated by commas (,). When the NTP service is set as enabled, this parameter must be delivered. |
|
NTP service status. Required when modify NTP Service. Choices:
|
|
Synchronization period. 60~864000. |
|
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 |
|
The password of the PowerStore host. |
|
Huawei Enterprise Storage rest api Timeout time. Default: |
|
Define whether the Ntp Server should exist or not. Choices:
|
|
Port number for the Huawei Enterprise array. If not passed, it will take 8088 as default. Default: |
|
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: Modify NTP Server
register: ntp_info
huawei.enterprise.hw_enterprise_ntp_server:
hostname: "{{ hostname }}"
username: "{{ username }}"
password: "{{ password }}"
valid_certs: "{{ valid_certs }}"
socket_timeout: "{{ socket_timeout }}"
storage_port: "{{ storage_port }}"
use_log: "{{ use_log }}"
cmo_sys_ntp_clnt_conf_switch: "< disabled | enabled >"
cmo_sys_ntp_clnt_conf_server_ip: "< ntp_server_ip >"
cmo_sys_ntp_clnt_conf_auth_switch: "< disabled | enabled >"
cmo_sys_ntp_sync_period : "< cmo_sys_ntp_sync_period >"
state: "present"
- name: Get NTP Server Config
register: ntp_info
huawei.enterprise.hw_enterprise_ntp_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:
- cmo_sys_ntp_clnt_conf_switch
- cmo_sys_ntp_clnt_conf_server_ip
- cmo_sys_ntp_clnt_conf_auth_switch
- cmo_sys_ntp_sync_period
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: |
|
Details of the NTP Server. Returned: When NTP Server exists Sample: |
|
NTP authentication status. Returned: success |
|
NTP server address. Returned: success |
|
NTP service status. Returned: success |
|
Synchronization period. Returned: success |
|
task execute remark Returned: always Sample: |