JN0-222 JNCIA-DevOps Practice Questions
Prepare for JN0-222 with more than an answer.
- 1
You are creating an Ansible inventory file in INI format. You need to define a group named
routersthat contains two hosts:r1.example.comandr2.example.com. Which syntax is correct?Show answer details
Correct answer: A
In an INI-formatted Ansible inventory, the group name is enclosed in square brackets
[group_name], followed by the list of hosts, one per line. - 2
Which Juniper PyEZ object is used to establish a connection to a Junos device and serves as the foundation for other utilities like
ConfigandFacts?Show answer details
Correct answer: D
The
Deviceclass fromjnpr.junosis the primary entry point. You instantiate aDeviceobject with hostname, user, and password, and then call.open()to establish the NETCONF session. - 3
True or False: In a Waterfall development methodology, testing is typically performed continuously alongside development in small iterations.
Show answer details
Correct answer: B
This is False. Waterfall is a linear, sequential methodology where testing occurs only after the implementation phase is complete. Agile/DevOps methodologies promote continuous testing.
- 4
A network reliability engineer is designing a new automation workflow. They need to choose a data serialization format that is primarily designed to be human-readable, supports comments natively, and does not require closing tags. Which format meets these specific requirements?
Show answer details
Correct answer: A
YAML (YAML Ain't Markup Language) is designed to be human-readable, uses indentation for structure (no closing tags), and supports comments (starting with #). JSON does not support comments natively, and XML uses closing tags and is more verbose.
- 5
While troubleshooting a Python script using the Juniper PyEZ library, you encounter a
ConnectError. The script attempts to connect to a device using NETCONF over SSH. You verify that the device is reachable via ping. What is the most likely cause of this specific error?Show answer details
Correct answer: B
A
ConnectErrorin PyEZ typically indicates that the transport layer connection failed. Since ICMP (ping) works, the network path is valid. However, PyEZ relies on NETCONF over SSH (default port 830). Ifset system services netconf sshis missing, the port is closed, causing the connection refusal. - 6
You are reviewing an Ansible playbook intended to configure Juniper devices. The playbook uses the
juniper_junos_configmodule. You want to ensure that the task only pushes changes if the current configuration differs from the desired state, and that it can be run multiple times without causing unintended side effects. What DevOps concept does this describe?Show answer details
Correct answer: C
Idempotency is the property where an operation can be applied multiple times without changing the result beyond the initial application. In Ansible, this means if the configuration already matches the desired state, no changes are made.
