Deprecated

Removed in None

i

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

cisco.nxos.nxos_ntp (6.0.3) — module

Manages core NTP configuration.

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

Authors: Jason Edelman (@jedelman8)

Install collection

Install with ansible-galaxy collection install cisco.nxos:==6.0.3


Add to requirements.yml

  collections:
    - name: cisco.nxos
      version: 6.0.3

Description

Manages core NTP configuration.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
# Set NTP Server with parameters
- cisco.nxos.nxos_ntp:
    server: 1.2.3.4
    key_id: 32
    prefer: enabled
    host: '{{ inventory_hostname }}'
    username: '{{ un }}'
    password: '{{ pwd }}'

Inputs

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

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

key_id:
    description:
    - Authentication key identifier to use with given NTP server or peer or keyword 'default'.
    type: str

prefer:
    choices:
    - enabled
    - disabled
    description:
    - Makes given NTP server or peer the preferred NTP server or peer for the device.
    type: str

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

vrf_name:
    description:
    - Makes the device communicate with the given NTP server or peer over a specific VRF
      or keyword 'default'.
    type: str

source_int:
    description:
    - Local source interface from which NTP messages are sent. Must be fully qualified
      interface name or keyword 'default'
    type: str

source_addr:
    description:
    - Local source address from which NTP messages are sent or keyword 'default'.
    type: str

Outputs

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 info after module execution
  returned: always
  sample:
    address: 192.0.2.2
    key_id: '48'
    peer_type: server
    prefer: enabled
    source: 192.0.2.3
    source_type: source
  type: dict
existing:
  description:
  - k/v pairs of existing ntp server/peer
  returned: always
  sample:
    address: 192.0.2.2
    key_id: '32'
    peer_type: server
    prefer: enabled
    source: ethernet2/1
    source_type: source-interface
  type: dict
proposed:
  description: k/v pairs of parameters passed into module
  returned: always
  sample:
    address: 192.0.2.2
    key_id: '48'
    peer_type: server
    prefer: enabled
    source: 192.0.2.3
    source_type: source
  type: dict
updates:
  description: command sent to the device
  returned: always
  sample:
  - ntp server 192.0.2.2 prefer key 48
  - no ntp source-interface ethernet2/1
  - ntp source 192.0.2.3
  type: list