community / community.general / 0.1.1 / module / ce_ntp_auth Manages NTP authentication configuration on HUAWEI CloudEngine switches. Authors: Zhijin Zhou (@QijunPan) preview | supported by communitycommunity.general.ce_ntp_auth (0.1.1) — module
Install with ansible-galaxy collection install community.general:==0.1.1
collections: - name: community.general version: 0.1.1
Manages NTP authentication configuration on HUAWEI CloudEngine switches.
- 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" ce_ntp_auth: key_id: 32 auth_mode: md5 auth_pwd: 11111111111111111111111 provider: "{{ cli }}" - name: "Configure ntp authentication key-id and trusted authentication keyid" 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" 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" ce_ntp_auth: key_id: 32 state: absent provider: "{{ cli }}" - name: "Unconfigure ntp authentication key-id and authentication enable" ce_ntp_auth: key_id: 32 authentication: enable state: absent provider: "{{ cli }}"
state: choices: - present - absent default: present description: - Manage the state of the resource. key_id: description: - Authentication key identifier (numeric). required: true auth_pwd: description: - Plain text with length of 1 to 255, encrypted text with length of 20 to 392. auth_mode: choices: - hmac-sha256 - md5 description: - Specify authentication algorithm. auth_type: choices: - text - encrypt default: encrypt description: - Whether the given password is in cleartext or has been encrypted. If in cleartext, the device will encrypt it before storing it. trusted_key: choices: - enable - disable default: disable description: - Whether the given key is required to be supplied by a time source for the device to synchronize to the time source. authentication: choices: - enable - disable description: - Configure ntp authentication enable or unconfigure ntp authentication enable.
changed: description: check to see if a change was made on the device returned: always sample: true type: bool end_state: description: k/v pairs of ntp authentication after module execution returned: always sample: authentication: 'off' authentication-keyid: - auth_mode: md5 key_id: '1' trusted_key: disable - auth_mode: md5 key_id: '32' trusted_key: enable type: dict existing: description: k/v pairs of existing ntp authentication returned: always sample: authentication: 'off' authentication-keyid: - auth_mode: md5 key_id: '1' trusted_key: disable type: dict proposed: description: k/v pairs of parameters passed into module returned: always sample: auth_mode: md5 auth_pwd: '1111' auth_type: text authentication: enable key_id: '32' state: present trusted_key: enable type: dict state: description: state as sent in from the playbook returned: always sample: present type: str updates: description: command sent to the device returned: always sample: - ntp authentication-key 32 md5 1111 - ntp trusted-key 32 - ntp authentication enable type: list