350-901 · Question #19
350-901 Question #19: Real Exam Question with Answer & Explanation
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.
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
Explanation
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.
Common mistakes.
- B. state: True is not a valid Ansible module state value; Ansible states use string literals such as present, absent, or enabled.
- C. config is not a valid parameter key for the ios_ntp module; the correct parameter for declaring intent is state.
- D. 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
Reference. https://docs.ansible.com/ansible/latest/collections/cisco/ios/ios_ntp_global_module.html
Topics
Community Discussion
No community discussion yet for this question.