cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1676
Views
5
Helpful
3
Replies

Help! aci_rest ansible module and token APIC-cookie

sarlindo1
Level 1
Level 1

Hello,

 

Is it possible using the ansible aci modules to login once and get the token and pass the cookie on subsequent aci_rest tasks?

The goal is to avoid having to login and logoff with userid/password on aci_rest calls that have loops.

 

Is this possible?

3 Replies 3

Alex Stevenson
Cisco Employee
Cisco Employee

 

Hello @sarlindo1 ,

 

This discussion Not able to access APIC REST APIs with web token , particularly the final post at the very bottom, may be of help.

 

Also, here are the Ansible Docs - cisco.aci.aci_rest – Direct access to the Cisco APIC REST API

 

And the Cisco APIC REST API Configuration Guide

Hi Alex,

 

That the discussion "Not able to access APIC REST APIs with web token" was sort of helpful. So basically in order to use web token, I need to resort to using the raw "uri" ansible module, so what is the point of the aci_rest module?

 

Also, as stated my goal is to avoid having to login and logoff with userid/password on aci_rest calls that have loops. Would using private keys in the aci_rest module achieve that goal?

Hi @sarlindo1 

Yes, what you are looking for is the signature based authentication. This way you do not use the user/pass credentials for login and you will not be restricted by the default ACI rate limiters for user logins.

 

Stay safe,

Sergiu