Reputation: 1006
I have a particular error on this line:
{% set icinga_ticket = salt['http.query'](https://ticket-generator.az.dev.com method=POST header_dict='{"Content-Type":"application/json"}' data="'{\"hostname\": \"minion.node.jio.com\"}'" backend=requests) %}
I got:
rendering SLS 'base:icinga.icinga2_core' failed: Jinja syntax error: expected token ',', got ':'
How to solve this error?
Upvotes: 1
Views: 1405
Reputation: 126
Try to separate the options with ,
and quote non variables like this: method='POST'
.
{% set icinga_ticket = salt['http.query']('https://ticket-generator.az.dev.com', method='POST', header_dict='{"Content-Type":"application/json"}', data="'{\"hostname\": \"minion.node.jio.com\"}'", backend='requests') %}
Btw have a look at the icinga2 module: https://docs.saltproject.io/en/latest/ref/modules/all/salt.modules.icinga2.html#salt.modules.icinga2.generate_ticket
Upvotes: 0