FAQ
Hello,

Im looking for a few suggestions as to the best approach for
assigning pillar data to minions dynamically.

I would like to make a dynamic list of service roles available
to salt, and then use this to control which pillar data is available
to each minion.

Initially my thoughts were to distribute the role list via pillar, but
discovered it wasn¹t possible to specify and evaluation order, as it is
with states. From reading around it also appears that new pillar data
isn¹t available until the full pillar evaluation is complete, which
precludes this idea as it can result in jinja attempting to evaluate None
types.

I don¹t mind writing modules if necessary, but I could do with some
advice on the best approach to take.

Thanks

Chris

This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error please notify the sender (as shown above). Kindly do not reproduce, print or forward any material received in error, please delete it immediately. Evertz UK Limited (Company No. 3458137) is incorporated in England and Wales and has its registered office at 100 Berkshire Place, Wharfedale Road, Winnersh, Wokingham, Berkshire, United Kingdom, RG41 5RD. Pharos Communications Pte Limited (Company No. 200817005N) is incorporated in Singapore and has its registered office at One Marina Boulevard, #28-00. Singapore 018989.

--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Search Discussions

  • Colton Myers at Oct 27, 2014 at 10:45 pm
    Hey Chris,

    Sorry for the late reply, I'm going through old un-answered threads.

    I would recommend writing an external pillar module. If you look at a simple example of an external pillar module which ships with salt, `cmd_yaml` (https://github.com/saltstack/salt/blob/develop/salt/pillar/cmd_yaml.py <https://github.com/saltstack/salt/blob/develop/salt/pillar/cmd_yaml.py>) you can see that the external pillar module actually does receive all of the normal pillar data for a minion, so you could distribute the list through pillar_roots and then have your external pillar module decide what data that minion gets based on that list.

    Hope that helps!

    --
    Colton Myers
    On Sep 8, 2014, at 11:26 AM, Chris Fane wrote:

    Hello,

    Im looking for a few suggestions as to the best approach for
    assigning pillar data to minions dynamically.

    I would like to make a dynamic list of service roles available
    to salt, and then use this to control which pillar data is available
    to each minion.

    Initially my thoughts were to distribute the role list via pillar, but
    discovered it wasnąt possible to specify and evaluation order, as it is
    with states. From reading around it also appears that new pillar data
    isnąt available until the full pillar evaluation is complete, which
    precludes this idea as it can result in jinja attempting to evaluate None
    types.

    I donąt mind writing modules if necessary, but I could do with some
    advice on the best approach to take.

    Thanks

    Chris

    This e-mail and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error please notify the sender (as shown above). Kindly do not reproduce, print or forward any material received in error, please delete it immediately. Evertz UK Limited (Company No. 3458137) is incorporated in England and Wales and has its registered office at 100 Berkshire Place, Wharfedale Road, Winnersh, Wokingham, Berkshire, United Kingdom, RG41 5RD. Pharos Communications Pte Limited (Company No. 200817005N) is incorporated in Singapore and has its registered office at One Marina Boulevard, #28-00. Singapore 018989.

    --
    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 [email protected].
    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 [email protected].
    For more options, visit https://groups.google.com/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupsalt-users @
postedSep 8, '14 at 5:27p
activeOct 27, '14 at 10:45p
posts2
users2

2 users in discussion

Chris Fane: 1 post Colton Myers: 1 post

People

Translate

site design / logo © 2023 Grokbase