community.network.ce_ntp_auth – Manages NTP authentication configuration on HUAWEI CloudEngine switches.¶
Note
This plugin is part of the community.network collection (version 1.3.2).
To install it use: ansible-galaxy collection install community.network
.
To use it in a playbook, specify: community.network.ce_ntp_auth
.
Parameters¶
Notes¶
Note
If
state=absent
, the module will attempt to remove the given key configuration. If a matching key configuration isn’t found on the device, the module will fail.If
state=absent
andauthentication=on
, authentication will be turned on.If
state=absent
andauthentication=off
, authentication will be turned off.Recommended connection is
network_cli
.This module also works with
local
connections for legacy playbooks.
Examples¶
- name: NTP AUTH 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: "Configure ntp authentication key-id"
community.network.ce_ntp_auth:
key_id: 32
auth_mode: md5
auth_pwd: 11111111111111111111111
provider: "{{ cli }}"
- name: "Configure ntp authentication key-id and trusted authentication keyid"
community.network.ce_ntp_auth:
key_id: 32
auth_mode: md5
auth_pwd: 11111111111111111111111
trusted_key: enable
provider: "{{ cli }}"
- name: "Configure ntp authentication key-id and authentication enable"
community.network.ce_ntp_auth:
key_id: 32
auth_mode: md5
auth_pwd: 11111111111111111111111
authentication: enable
provider: "{{ cli }}"
- name: "Unconfigure ntp authentication key-id and trusted authentication keyid"
community.network.ce_ntp_auth:
key_id: 32
state: absent
provider: "{{ cli }}"
- name: "Unconfigure ntp authentication key-id and authentication enable"
community.network.ce_ntp_auth:
key_id: 32
authentication: enable
state: absent
provider: "{{ cli }}"
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Zhijin Zhou (@QijunPan)