Forum Discussion

reddev12's avatar
reddev12
Icon for Altocumulus rankAltocumulus
Jul 13, 2023

f5 token based authentication using uri module throw error

using below yml file with header as below and token is variable authx . error i am getting is "authx is undefined"

is the header correct ?

 ---
- name: "{{ name }}"
uri:
url: "{{ url }}"
method: "GET"
headers:
X-F5-Auth-Token: "{{ authx }}"
validate_certs: "no"
status_code: "{{ status|default(200) }}"
timeout: 60
ignore_errors: True
delegate_to: localhost

 

JRahm 

3 Replies

    • reddev12's avatar
      reddev12
      Icon for Altocumulus rankAltocumulus

      remotely we will execute the ansible script ...and token is created from other script and kept as ansible vars ...just want to place that token variable in this yaml

      url will contain f5 rest api 

      • JRahm's avatar
        JRahm
        Icon for Admin rankAdmin

        authx variable isn't populating, so that will need to be solved before you can troubleshoot anything else. what does that playbook look like?