Article 56C7G saltstack comparing jinja variables

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?latest?d=yIl2AUoC8zA latest?i=WHrNe7Vq708:18zBjzLyh_Y:F7zBnMy latest?i=WHrNe7Vq708:18zBjzLyh_Y:V_sGLiP latest?d=qj6IDK7rITs latest?i=WHrNe7Vq708:18zBjzLyh_Y:gIN9vFwWHrNe7Vq708
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments