So I'm moving some data from states into the pillar where it belongs. In particular DNS zone files and SSL certificates (with private keys) shouldn't be propagated to every minion, so they belong in the pillar where I can control them better.
The problems with using files as a source of pillar data started with the documentation. I first found this page:
https://docs.saltstack.com/en/latest/ref/pillar/all/salt.pillar.file_tree.html
This is a shame because now I can't use the pillar top.sls to control which minions see this pillar data. Instead I need to use nodegroups or hostnames. Why do I need a new way to attach pillar data to the correct minions, even after I have a top.sls I'm happy with?
OK, so I keep trying... several hours later I stumble on the fact that in order to get the changes to be recognised, I not only need
salt '*' saltutil.refresh_pillar
But I also have to do a complete restart of the master service.
So, like so much of salt: a great idea, with poor documentation and some odd choices that don't fit into the big picture. Is this just a natural outcome of an open source project which isn't led top-down by a company also offering a commercial product?
How can casual users of salt like myself help?
On Sat, Feb 11, 2017 at 10:17 PM, Ari Maniatis <aristedes...@gmail.com> wrote:
This is a shame because now I can't use the pillar top.sls to control which minions see this pillar data. Instead I need to use nodegroups or hostnames. Why do I need a new way to attach pillar data to the correct minions, even after I have a top.sls I'm happy with?
That has to do with the way external pillars work. When a minion retrieves its pillar data it passes in its ID. The external pillar module decides if it will return any data for that ID.
But I also have to do a complete restart of the master service.
I think this is only true for nodegroups, not external pillars.
How can casual users of salt like myself help?
If you are familiar with Python it is certainly possible to make file_tree behave the way you want it to. But even if you don't know Python it's not hard to submit a PR to add information to the documentation that would have helped you. For those of us that live and breathe Salt every day it's sometimes hard to see what new users (or even just users that are trying a feature for the first time) might miss or find confusing. We love it when Salt users file doc PRs, because it brings an end-user perspective that we sometimes don't have.
I hear your frustration, but also appreciate that you took time to email the list. Thanks for the feedback.
Thank you. I'll feel more comfortable now making my own doc PRs
when I hit this sort of thing, knowing that they are encouraged.
However I would have know how to create the correct link syntax.
Ari
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/b7211dde-981e-4c62-b20b-25c64d557e4c%40googlegroups.com.
--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/881ac86c-7fff-4142-9170-682d686c729b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
zones:
{%- for zone_file in salt.file.find('/usr/local/etc/salt/data/pillar/zones/', type='f') %}
{{ salt.file.basename(zone_file) }}:
content: |
{%- import_text zone_file as zone %}
{{ zone | indent(6,true) }}
{%- endfor %} MX 10 mail.example.com.@ MX 10 mail.example.com.zones:
{%- for zone_file, mtime in salt.file.find('/usr/local/etc/salt/data/pillar/zones/', type='f', print='path,mtime') %}
{{ salt.file.basename(zone_file) }}:
serial: {{ mtime }}
content: |
{%- import_text zone_file as zone %}
{{ zone | trim | indent(6,true) }}
{%- endfor %}--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/9843900a-0a7f-4487-9180-425ae97e8596%40googlegroups.com.
You received this message because you are subscribed to a topic in the Google Groups "Salt-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/salt-users/PaMVmau8D1Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to salt-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/CAP5kWAGRPSSvoe4BwUZbxxzCPsfMPmc9yXfhqs3tUFL85iVggw%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/9843900a-0a7f-4487-9180-425ae97e8596%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to a topic in the Google Groups "Salt-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/salt-users/PaMVmau8D1Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to salt-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/CAP5kWAGRPSSvoe4BwUZbxxzCPsfMPmc9yXfhqs3tUFL85iVggw%40mail.gmail.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.
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/ac4f135b-8667-27de-84c2-43f438d97129%40gmail.com.
To unsubscribe from this group and all its topics, send an email to salt-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/CAP5kWAEWHPjj2_mhW6yTskv63gGbGcXBZDQLkW144F9D5sjb0Q%40mail.gmail.com.
To unsubscribe from this group and all its topics, send an email to salt-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/CAP5kWAEWHPjj2_mhW6yTskv63gGbGcXBZDQLkW144F9D5sjb0Q%40mail.gmail.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.
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/02150a10-ab51-5db1-96ed-49f96789b008%40gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to salt-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/CAP5kWAFXeguaQseVrUwxO6tD9MTJVRjE6_Ppnb4Te7hS%2B4GFFA%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/CAP5kWAFXeguaQseVrUwxO6tD9MTJVRjE6_Ppnb4Te7hS%2B4GFFA%40mail.gmail.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.
To view this discussion on the web visit https://groups.google.com/d/msgid/salt-users/5B8F07A8-483D-4148-B922-F5E1C96C989E%40saltstack.com.