JNCIA-DevOps: Juniper Networks Certified Associate – Automation (2021) — Question 21
Which code block shows valid YAML syntax?
Answer options
- A. Switches: - s1 - s2
- B. Switches: s1 s2
- C. Switches: {s1, s2}
- D. Switches: ["s1", "s2"]
Correct answer: B
Explanation
Option B is correct because it follows the YAML syntax rules where items can be listed without additional characters. Options A and D use invalid formats for YAML lists, while option C incorrectly employs curly braces, which are not used for lists in YAML.