QuestionQ92
VerifiedController-Based Network AutomationAn engineer must audit Cisco Catalyst Center-managed devices to verify configuration-sync status. The engineer must authenticate, GET the device list, and return the JSON content into a registered variable for later checks. Drag the code snippets into the boxes to construct the artifact. Not every option is used. Options can be used more than once.
Drag & Drop
--- - name: Get Catalyst Center devices hosts: localhost gather_facts: false vars: base: "https://198.51.100.10" user: "dnac" pass: "C1sco12345" tasks: - name: Token : url: "{{base}}/dna/system/api/v1/auth/token" : POST user: "{{user}}" password: "{{pass}}" force_basic_auth: true validate_certs: false register: tok - name: Inventory uri: url: "{{base}}/dna/intent/api/v1/network-device" : GET headers: X-Auth-Token: "{{ tok.json.Token }}" : true validate_certs: false : devices
Community Discussion