FAQ
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
<http://rpm.pbone.net/index.php3/stat/4/idpl/16845323/dir/scientific_linux_6/com/bash-4.1.2-8.el6.x86_64.rpm.html>
),
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

Previous

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
posts2
users2

2 users in discussion

Robert Chen: 1 post Florian Ermisch: 1 post

People

Translate

site design / logo © 2021 Grokbase