Deprecated

Removed in None

i

Reason:Updated module released with more functionality. | Alternative:ios_ntp_global

cisco.ios.ios_ntp (6.1.4) — module

(deprecated, removed after 2024-01-01) Manages core NTP configuration.

| "added in version" 1.0.0 of cisco.ios"

Authors: Federico Olivieri (@Federico87), Joanie Sylvain (@JoanieAda)

Install collection

Install with ansible-galaxy collection install cisco.ios:==6.1.4


Add to requirements.yml

  collections:
    - name: cisco.ios
      version: 6.1.4

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
- name: Example ntp play
  cisco.ios.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
- name: Example ntp play absent
  cisco.ios.ios_ntp:
    acl: NTP_ACL
    logging: true
    state: absent
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Set NTP authentication
- name: Example ntp play auth
  cisco.ios.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
- name: Example ntp play auth
  cisco.ios.ios_ntp:
    server: 10.0.255.10
    source_int: Loopback0
    acl: NTP_ACL
    logging: true
    vrf: mgmt
    key_id: 10
    auth_key: 15435A030726242723273C21181319000A
    auth: true
    state: present

Inputs

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

vrf:
    description:
    - VRF configuration for NTP servers
    type: str

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.
    type: str

key_id:
    description:
    - auth_key id. Data type string
    type: str

server:
    description:
    - Network address of NTP server.
    type: str

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

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

source_int:
    description:
    - Source interface for NTP packets.
    type: str

Outputs

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