ansible.builtin.ios_ntp (v2.9.24) — module

Manages core NTP configuration.

| "added in version" 2.8 of ansible.builtin"

Authors: Federico Olivieri (@Federico87)

preview | supported by network

Install Ansible via pip

Install with pip install ansible==2.9.24

Description

Manages core NTP configuration.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Set new NTP server and source interface
- ios_ntp:
    server: 10.0.255.10
    source_int: Loopback0
    logging: false
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Remove NTP ACL and logging
- ios_ntp:
    acl: NTP_ACL
    logging: true
    state: absent
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Set NTP authentication
- ios_ntp:
    key_id: 10
    auth_key: 15435A030726242723273C21181319000A
    auth: true
    state: present
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Set new NTP configuration
- ios_ntp:
    server: 10.0.255.10
    source_int: Loopback0
    acl: NTP_ACL
    logging: true
    key_id: 10
    auth_key: 15435A030726242723273C21181319000A
    auth: true
    state: present

Inputs

    
acl:
    description:
    - ACL for peer/server access restricition.

auth:
    default: false
    description:
    - Enable NTP authentication. Data type boolean.
    type: bool

state:
    choices:
    - present
    - absent
    default: present
    description:
    - Manage the state of the resource.

key_id:
    description:
    - auth_key id. Data type string

server:
    description:
    - Network address of NTP server.

logging:
    default: false
    description:
    - Enable NTP logs. Data type boolean.
    type: bool

auth_key:
    description:
    - md5 NTP authentication key of type 7.

source_int:
    description:
    - Source interface for NTP packets.

Outputs

commands:
  description: command sent to the device
  returned: always
  sample:
  - no ntp server 10.0.255.10
  - no ntp source Loopback0
  type: list