saltstack comparing jinja variables
by bradvan from LinuxQuestions.org on (#56C7G)
Trying to compare two jinja variables, but not getting it correct. Get back:Code:Jinja syntax error: expected token ':', got '}' The code is: Code:{% set CurVers = salt['pkg.version']('NessusAgent') | regex_replace('-es7', '') %}
{% set NewVers = '7.7.0' %}
{% if {{ CurVers|format(value|float) }} < {{ NewVers|format(value|float) }} %}
remove_current:
pkg.remove:
- name: NessusAgent
{% endif %}CurVers is getting set to 7.4.0 and NewVers to 7.7.0. What am I doing wrong?


{% set NewVers = '7.7.0' %}
{% if {{ CurVers|format(value|float) }} < {{ NewVers|format(value|float) }} %}
remove_current:
pkg.remove:
- name: NessusAgent
{% endif %}CurVers is getting set to 7.4.0 and NewVers to 7.7.0. What am I doing wrong?