FAQ
is it possilble to use the template feature in pillar state file like below?

more /srv/pillar/lab/tomcat.sls

{% set appns = pillar['appName'] %}
include:
   - appconf.{{ appns }}


appName pillar data i will be setting via salt command

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

  • Stephen Spencer at Oct 31, 2014 at 2:49 am
    For Reasons related to pillar's architecture you can't access pillar data
    from a pillar file. You're trying to set a value in a dict to another value
    in the same dict; you haven't actually gotten past the instantiation of the
    structure at the point that you're trying to access that same structure, so
    it's just not available for use. There are certain kinds of shenanigans
    that can be gotten up to that produce the desired effect., but from plain
    old pillar you're out of luck.

    -S

    -S
    On Oct 30, 2014 6:26 AM, "Arun Rajendran" wrote:

    is it possilble to use the template feature in pillar state file like below?
    more /srv/pillar/lab/tomcat.sls

    {% set appns = pillar['appName'] %}
    include:
    - appconf.{{ appns }}


    appName pillar data i will be setting via salt command

    --
    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 @
postedOct 30, '14 at 11:26a
activeOct 31, '14 at 2:49a
posts2
users2

2 users in discussion

Arun Rajendran: 1 post Stephen Spencer: 1 post

People

Translate

site design / logo © 2022 Grokbase