ansible fiortios api login failure

From thelinuxwiki
Revision as of 18:17, 14 April 2025 by Nighthawk (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

fortios version: 7.4.5

error(from ansible): ansible.module_utils.connection.ConnectionError: Expecting value: line 1 column 1 (char 0)

description: login with access_token failing from ansible to fortios. logging in with same token via curl is working.

solution:

check the following setting

foritos # show full-configuration | grep rest-api-key-url-query
   set rest-api-key-url-query disabled

if disabled then do...

foritos # config system global
foritos (global) # set rest-api-key-url-query enable
foritos (global) # end

categor:ansible