nerdexam
Cisco

350-901 · Question #19

Refer to the exhibit. Which key value pair from the ios_ntp Ansible module creates an NTP server peer? name: IOS XE Configuration hosts: ios_xe connection: local gather_facts: false tasks: - name…

The correct answer is A. state: present. The state: present key-value pair instructs Ansible to ensure the NTP server configuration exists, which creates the NTP peer if it is not already present.

Network Automation

Question

Refer to the exhibit. Which key value pair from the ios_ntp Ansible module creates an NTP server peer?
  • name: IOS XE Configuration hosts: ios_xe connection: local gather_facts: false
tasks:
  • name: IOS NTP ios_ntp: provider: "{{ creds }}" server: 10.0.255.10 source_int: GigabitEthernet2 logging: false

Options

  • Astate: present
  • Bstate: True
  • Cconfig: present
  • Dconfig: True

How the community answered

(32 responses)
  • A
    88% (28)
  • B
    3% (1)
  • C
    3% (1)
  • D
    6% (2)

Why each option

The state: present key-value pair instructs Ansible to ensure the NTP server configuration exists, which creates the NTP peer if it is not already present.

Astate: presentCorrect

In Ansible modules, state: present is the standard idempotent directive that tells the module to create or ensure the existence of the specified resource - in this case the NTP server peer defined by the server and source_int parameters. Without state: present, the module may not take any action to persist the configuration to the device.

Bstate: True

state: True is not a valid Ansible module state value; Ansible states use string literals such as present, absent, or enabled.

Cconfig: present

config is not a valid parameter key for the ios_ntp module; the correct parameter for declaring intent is state.

Dconfig: True

config: True is not a recognized parameter or value combination in the ios_ntp Ansible module.

Concept tested: Ansible ios_ntp module state parameter for NTP configuration

Source: https://docs.ansible.com/ansible/latest/collections/cisco/ios/ios_ntp_global_module.html

Topics

#Ansible#Network Automation#NTP Configuration#IOS XE

Community Discussion

No community discussion yet for this question.

Full 350-901 Practice