1

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?

Atom Store
  • 961
  • 1
  • 11
  • 35

1 Answers1

0

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

SynPrime
  • 126
  • 2