nerdexam
Cisco

300-635 · Question #63

An engineer is implementing a Cisco Nexus switch. Which command executes an Ansible playbook called n9k.yml?

The correct answer is A. ansible-playbook n9k.yml. ansible-playbook n9k.yml is the correct syntax for executing an Ansible playbook - the command takes the playbook filename directly as a positional argument, with no additional flags required. Why the distractors are wrong: B uses -f, which in Ansible controls the number of paral

Network Automation Foundation

Question

An engineer is implementing a Cisco Nexus switch. Which command executes an Ansible playbook called n9k.yml?

Options

  • Aansible-playbook n9k.yml
  • Bansible-playbook -f n9k.yml -run now
  • Cansible-playbook -f n9k.yml
  • Dansible-playbook -f N9K.yml

How the community answered

(53 responses)
  • A
    89% (47)
  • B
    4% (2)
  • C
    6% (3)
  • D
    2% (1)

Explanation

ansible-playbook n9k.yml is the correct syntax for executing an Ansible playbook - the command takes the playbook filename directly as a positional argument, with no additional flags required.

Why the distractors are wrong:

  • B uses -f, which in Ansible controls the number of parallel forks (e.g., -f 10), not file selection - and -run now is not a valid flag at all.
  • C combines the real -f flag with a filename, but -f expects an integer (fork count), not a filename, so this would throw an error.
  • D has the same structural problem as C, plus uses uppercase N9K.yml - Linux filesystems are case-sensitive, so this would fail to find the file even if the syntax were valid.

Memory tip: Think of ansible-playbook like running a Python script - you just pass the filename directly: python script.pyansible-playbook playbook.yml. No flags needed to specify the file.

Topics

#Ansible playbooks#Nexus automation#CLI syntax#Playbook execution

Community Discussion

No community discussion yet for this question.

Full 300-635 Practice