Hi Robert,

the pkg exec-module has functions to query and compare pkg versions.
You basicly get the version of the bash pkg:
  {% set bash_version = pkg.version(bash) %}
and then use pkg.version_cmp (I think?) in your {% if %} to wrap the state definition.

Regards, Florian

PS: I'm lazy right now, so there's some quotation marks missing and I haven't checked the function names.

Am 25. Februar 2016 09:17:30 MEZ, schrieb Robert Chen <robertchen117@gmail.com>:
if bash version < 4.1.2-8 ( bash-4.1.2-8.el6.x86_64.rpm
then upgrade it to bash-4.1.2-15.el6.x86_64.rpm)

otherwise do nothing.
You received this message because you are subscribed to the Google Groups "Salt-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts


Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 2 of 2 | next ›
Discussion Overview
groupsalt-users @
postedFeb 25, '16 at 8:17a
activeFeb 25, '16 at 8:42a

2 users in discussion

Robert Chen: 1 post Florian Ermisch: 1 post



site design / logo © 2022 Grokbase