ce_ntp - Manages core NTP configuration on HUAWEI CloudEngine switches.
New in version 2.4.
Synopsis
- Manages core NTP configuration on HUAWEI CloudEngine switches.
Parameters
| Parameter | Choices/Defaults | Comments | 
|---|---|---|
| is_preferred | 
 | Makes given NTP server or peer the preferred NTP server or peer for the device. | 
| key_id | Authentication key identifier to use with given NTP server or peer. | |
| peer | Network address of NTP peer. | |
| server | Network address of NTP server. | |
| source_int | Local source interface from which NTP messages are sent. Must be fully qualified interface name, i.e.  40GE1/0/22,vlanif10. Interface types, such as10GE,40GE,100GE,Eth-Trunk,LoopBack,MEth,NULL,Tunnel,Vlanif. | |
| state | 
 | Manage the state of the resource. | 
| vpn_name | Default: "_public_" | Makes the device communicate with the given NTP server or peer over a specific vpn. | 
Examples
- name: NTP test
  hosts: cloudengine
  connection: local
  gather_facts: no
  vars:
    cli:
      host: "{{ inventory_hostname }}"
      port: "{{ ansible_ssh_port }}"
      username: "{{ username }}"
      password: "{{ password }}"
      transport: cli
  tasks:
  - name: "Set NTP Server with parameters"
    ce_ntp:
      server: 192.8.2.6
      vpn_name: js
      source_int: vlanif4001
      is_preferred: enable
      key_id: 32
      provider: "{{ cli }}"
  - name: "Set NTP Peer with parameters"
    ce_ntp:
      peer: 192.8.2.6
      vpn_name: js
      source_int: vlanif4001
      is_preferred: enable
      key_id: 32
      provider: "{{ cli }}"
   Return Values
Common return values are documented here, the following are the fields unique to this module:
| Key | Returned | Description | 
|---|---|---|
| changed boolean | always | check to see if a change was made on the device Sample: True | 
| end_state dict | always | k/v pairs of ntp info after module execution Sample: {'server': '2.2.2.2', 'key_id': '48', 'is_preferred': 'enable', 'vpn_name': 'js', 'source_int': 'vlanif4002'} | 
| existing dict | always | k/v pairs of existing ntp server/peer Sample: {'server': '2.2.2.2', 'key_id': '32', 'is_preferred': 'disable', 'vpn_name': 'js', 'source_int': 'vlanif4002'} | 
| proposed dict | always | k/v pairs of parameters passed into module Sample: {'server': '2.2.2.2', 'key_id': '48', 'is_preferred': 'enable', 'vpn_name': 'js', 'source_int': 'vlanif4002', 'state': 'present'} | 
| updates list | always | command sent to the device Sample: ['ntp server 2.2.2.2 authentication-keyid 48 source-interface vlanif4002 vpn-instance js preferred'] | 
Status
This module is flagged as preview which means that it is not guaranteed to have a backwards compatible interface.
Maintenance
This module is flagged as community which means that it is maintained by the Ansible Community. See Module Maintenance & Support for more info.
For a list of other modules that are also maintained by the Ansible Community, see here.
Author
- Zhijin Zhou (@CloudEngine-Ansible)
Hint
If you notice any issues in this documentation you can edit this document to improve it.
    © 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
    https://docs.ansible.com/ansible/2.6/modules/ce_ntp_module.html