Ansible playbook development for network automation: Practice Questions — Automation and Configuration (NVIDIA-Certified Professional: AI Networking)
Ansible Playbook Development for Network Automation: Practice Questions This set of multiple-choice questions is designed to help candidates prepare...
Ansible Playbook Development for Network Automation: Practice Questions
This set of multiple-choice questions is designed to help candidates prepare for the Automation and Configuration section of the NVIDIA-Certified Professional: AI Networking exam. The focus is on developing Ansible playbooks to automate network tasks effectively, a critical skill for managing NVIDIA AI Networking environments.
Which Ansible module is primarily used to manage network device configurations in an NVIDIA AI Networking environment?
- A. ansible.builtin.command
- B. ansible.netcommon.nmcli
- C. ansible.netcommon.network_cli
- D. ansible.netcommon.nvue_config
Correct Answer: D
Explanation: The ansible.netcommon.nvue_config module is specifically designed to manage switch configurations using NVUE templates, which is essential for NVIDIA AI Networking automation.
In an Ansible playbook, which keyword is used to specify the set of commands or tasks to be executed on network devices?
- A. tasks
- B. vars
- C. hosts
- D. handlers
Correct Answer: A
Explanation: The tasks section contains the list of commands or modules that Ansible executes on the targeted hosts.
Which of the following is the best practice for managing sensitive data such as device credentials in Ansible playbooks for network automation?
- A. Hardcode credentials directly in the playbook
- B. Use Ansible Vault to encrypt sensitive data
- C. Store credentials in plain text files on the control node
- D. Include credentials in the inventory file without encryption
Correct Answer: B
Explanation: Ansible Vault is used to encrypt sensitive information, ensuring secure handling of credentials in automation workflows.
When developing an Ansible playbook to automate switch configuration using NVUE templates, which file format is typically used to define the templates?
- A. JSON
- B. YAML
- C. XML
- D. INI
Correct Answer: B
Explanation: YAML is the standard file format for Ansible playbooks and NVUE templates, providing readability and structure for configuration management.
What is the purpose of the gather_facts directive in an Ansible playbook targeting network devices?
- A. To collect detailed information about the target devices before executing tasks
- B. To execute commands without collecting any data
- C. To disable all logging during playbook execution
- D. To automatically update the playbook syntax
Correct Answer: A
Explanation: gather_facts collects information about the target devices, which can be used to conditionally execute tasks or verify device states.
Which Ansible feature allows you to reuse common network automation tasks across multiple playbooks for NVIDIA AI Networking?
- A. Roles
- B. Handlers
- C. Variables
- D. Templates
Correct Answer: A
Explanation: Roles enable modular and reusable task collections, making it easier to maintain and scale network automation playbooks.
In an Ansible playbook, how do you ensure that a network device configuration change is only applied if the current configuration differs from the desired state?
- A. Use the check_mode option
- B. Use idempotent modules that compare and apply changes only when necessary
- C. Manually verify device configuration before running the playbook
- D. Run the playbook with verbose logging enabled
Correct Answer: B
Explanation: Idempotent modules ensure configurations are only changed if needed, preventing unnecessary updates and potential disruptions.
Which command runs an Ansible playbook named network_automation.yml with increased verbosity to help debug issues?
- A. ansible-playbook network_automation.yml -v
- B. ansible network_automation.yml --debug
- C. ansible-playbook network_automation.yml --verbose
- D. ansible-playbook network_automation.yml -vvv
Correct Answer: D
Explanation: The -vvv flag increases verbosity, providing detailed output useful for troubleshooting playbook execution.
More in this topic
Ready to test your knowledge?
Put what you've learned into practice with a quick quiz and track your progress.
Test your knowledge →