FAQ

Search Discussions

  • Alfredo Palhares at Nov 11, 2014 at 4:53 pm
  • Colton Myers at Nov 21, 2014 at 9:59 pm
    This is a perfect use case for custom modules:

    http://docs.saltstack.com/en/latest/ref/modules/ <http://docs.saltstack.com/en/latest/ref/modules/>

    Just throw a python module into /srv/salt/_modules (by default), run `salt '*' saltutil.sync_all`, and boom, you can call that module using the `salt` dictionary in jinja.

    --
    Colton Myers
    Platform Engineer, SaltStack
    @basepi on Github/Twitter/IRC
    On Nov 11, 2014, at 9:53 AM, Alfredo Palhares wrote:

    To answer part of my own question:
    {% if influxdb["version"] is defined %}
    {% set filename = "influxdb_ {{ influxdb['version'] }}_{{ grains['osarch'] }}.deb" %}
    {% else %}
    {% set filename = "influxdb_latest_{{ grains['osarch'] }}.deb" %}
    {% endif }
    String contatenation is done like this:
    {% set filename = "influxdb_" + influxdb['version'] + "_" + grains['osarch'] + ".deb" %}

    Still looking to figure out the rest.

    --
    Regards,
    Alfredo Palhares

    --
    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.
    --
    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.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupsalt-users @
postedNov 11, '14 at 4:26p
activeNov 21, '14 at 9:59p
posts3
users2

2 users in discussion

Alfredo Palhares: 2 posts Colton Myers: 1 post

People

Translate

site design / logo © 2022 Grokbase