{% set host = salt['http.query']('https://netbox.local/api/virtualization/virtual-machines/?name=test0101', verify_ssl=False, method="GET", header_dict={"Authorization": "Token XXX"}) %}
each option is it’s own item in the function call so needs to be separated by commas. as well as be treated individually.
also, you should check the output. as you most likely want the body sub item not just the raw output
--
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/CAFFTi_KH6%3DZPdN5kRkkYmA%3DXJW34hWkiX0kCkbsnjNbS3e8XrQ%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/CAPaX09hopvMtWuuM2vs5ayJ%3D592ASbKE_BLcdvL2Rdoxxd7ZHw%40mail.gmail.com.
that is a yaml rendering error not a jinja rendering error. It means the output of host might not be what you are expecting. try "out {{ host | json}}" instead of "out {{ host }}"
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/CAFFTi_JFwTY4XKNxNpSpu5zg0Vn4ndec%2B6JXO7EOWaOSR_zuug%40mail.gmail.com.
{{host["body"] | json }}
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/CAFFTi_Jna%2BL4yYr3N06xwP0%2Be3aq0uwMRD47HT%3DFqKEeraYong%40mail.gmail.com.