Seeking assistance with properly parsing returned json data, storing 
desired string as variable, to then append it in another play that updates 
a resource.  Essentially I am interacting with Cisco ISE APIs to 
manage/update endpoint attributes.  Overview of playbook:

-The first play is a GET query to provide me with a specific endpoint 
details

-The next play prints the returned output essentially showing the admin 
that everything is good thus far

-Then I extract the endpoint ID string using json_query and store it as a 
variable

-For peace of mind the following play prints the variable to show we have 
the ID string of the endpoint

-Then the last play I attempt to update the endpoint group assignment via 
appending the id string 

I am stuck on the last play that appends the endpoint id string.  Play 
using json_query:

  - name: Get ISE ID String

    set_fact:

     id: "{{ endpoint_id | json_query(jmesquery) }}"

    vars:

      jmesquery: '*.SearchResult.resources[*].id'

Tower output showing how the id string is being appended:

"status": 400, "url": 
"https://xx.xx.xx.xx:9060/ers/config/endpoint/[[u'69d3bf30-ce12-11eb-ba90-c63c5470e9ab']]"

How can I properly store/append the endpoint id string properly so that the 
url in my last play looks like this:

"status": 400, "url": 
"https://xx.xx.xx.xx:9060/ers/config/endpoint/69d3bf30-ce12-11eb-ba90-c63c5470e9ab";

  Please advise.  TIA!

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ansible-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-devel/9bd5fa52-3cb3-44c0-b84c-3a4755cce887n%40googlegroups.com.

Reply via email to