We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I am experiencing an issue when trying to assign a value(icinga_ticket) on my post http query request. Have the fqdn value set from grain
Below is how it is defined in my state
{% set fqdn = salt'grains.get' %} {% set icinga_ticket = salt['http.query']('https://ticket-generator.az.dev.opd.com', method='POST', header_dict='{"Content-Type":"application/json"}', data='{"hostname": {{ fqdn }} }', backend='requests') %}
Error: Rendering SLS 'base:icinga.icinga2_core' failed: Jinja error: 'str' object does not support item assignment Traceback (most recent call last):
But when i execute the below command through cli it works fine.
salt-call http.query https://ticket-generator.az.dev.opd.com method=POST header_dict='{"Content-Type":"application/json"}' data="'{"hostname": "minion.node.dev.opd.com"}'" backend=requests local: ---------- body: {"icinga_ticket":"7609f6bc84d97748e15df9436aab07fbf48756d3"}
The text was updated successfully, but these errors were encountered:
@srikanth-2 you need to fix a few things
{% set fqdn = salt['grains.get']('grain-here') %} {% set data = { 'hostname':fqdn } %} {% set icinga_ticket = salt['http.query']('https://ticket-generator.az.dev.opd.com', method='POST', header_dict='{"Content-Type":"application/json"}', data=data, backend='requests') %}
Sorry, something went wrong.
No branches or pull requests
I am experiencing an issue when trying to assign a value(icinga_ticket) on my post http query request.
Have the fqdn value set from grain
Below is how it is defined in my state
{% set fqdn = salt'grains.get' %}
{% set icinga_ticket = salt['http.query']('https://ticket-generator.az.dev.opd.com', method='POST', header_dict='{"Content-Type":"application/json"}', data='{"hostname": {{ fqdn }} }', backend='requests') %}
Error:
Rendering SLS 'base:icinga.icinga2_core' failed: Jinja error: 'str' object does not support item assignment
Traceback (most recent call last):
But when i execute the below command through cli it works fine.
salt-call http.query https://ticket-generator.az.dev.opd.com method=POST header_dict='{"Content-Type":"application/json"}' data="'{"hostname": "minion.node.dev.opd.com"}'" backend=requests
local:
----------
body:
{"icinga_ticket":"7609f6bc84d97748e15df9436aab07fbf48756d3"}
The text was updated successfully, but these errors were encountered: