300-635 · Question #17
Which Ansible playbook fragment returns the fewest queried ACI endpoint groups?
The correct answer is D. ```yaml - name: GET EPGs aci_epg: host: "{{ inventory_hostname }}" username: "{{ username }}" password: "{{ password }}" validate_certs: no tenant: prod_tenant state: query ap: internet epg: web ```. Option D is correct because it provides all three levels of specificity in the ACI object hierarchy - tenant, ap (Application Profile), and epg - which pinpoints exactly one endpoint group, returning the smallest possible result set. Why the distractors are wrong: A omits both…
Question
Options
- A
- name: GET EPGs aci_epg: host: "{{ inventory_hostname }}" username: "{{ username }}" password: "{{ password }}" validate_certs: no state: query ap: internet - B
- name: GET EPGs aci_epg: host: "{{ inventory_hostname }}" username: "{{ username }}" password: "{{ password }}" validate_certs: no tenant: prod_tenant state: query ap: internet - C
- name: GET EPGs aci_epg: host: "{{ inventory_hostname }}" username: "{{ username }}" password: "{{ password }}" validate_certs: no tenant: prod_tenant state: query epg: web - D
- name: GET EPGs aci_epg: host: "{{ inventory_hostname }}" username: "{{ username }}" password: "{{ password }}" validate_certs: no tenant: prod_tenant state: query ap: internet epg: web
How the community answered
(35 responses)- A11% (4)
- B6% (2)
- C3% (1)
- D80% (28)
Explanation
Option D is correct because it provides all three levels of specificity in the ACI object hierarchy - tenant, ap (Application Profile), and epg - which pinpoints exactly one endpoint group, returning the smallest possible result set.
Why the distractors are wrong:
- A omits both
tenantandepg, so ACI returns all EPGs across every tenant that have an AP named "internet" - the broadest query of all four. - B adds
tenantbut still omitsepg, so it returns all EPGs within theinternetAP inprod_tenant- more specific than A, but still a collection. - C specifies
tenantandepgbut omitsap, meaning ACI searches for an EPG named "web" across all Application Profiles inprod_tenant- potentially multiple results.
Memory tip: Think of ACI's hierarchy as a postal address - Tenant → AP → EPG maps to Country → City → Street. The more address fields you fill in, the fewer results you get back. A query with all three fields (tenant + ap + epg) is a fully addressed letter; omitting any field is like leaving off part of the address and getting mail for an entire city instead.
Topics
Community Discussion
No community discussion yet for this question.