-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
YAML.org recommends .yaml
extension for pillar data
#51910
Comments
@noelmcloughlin but pillar.sls files aren't only |
@noelmcloughlin As @aboe76 points out, pillars are a mixture of jinja templating and yaml hence the @saltstack/team-core thoughts on this? |
I'm personally disinclined given the fact that they're not actually YAML files, they just use YAML syntax. YAML files just happen to be a subset of Salt state and pillar files. I suspect there may be documentation that suggests otherwise, but it seems like allowing
If we have some documentation that suggests a |
I understand where this is coming from but I would strongly discourage it. it would mandate that how we look up sls files needs to be changed and could potentially break any existing pillars if they have added .yaml files tot he tree for any other reason. I also think it makes adoption harder, because now there is an arbitrary, confusing construct that pops up in random pillar trees and a need to explain why we have multiple loaded file types |
If you're really interested in being able to load from Or, there's also the cmd_yaml pillar module that you could use, though I'm not entirely sure on the syntax there. |
This issue is to request support for files with extension |
The background to this request is discussion at saltstack-formulas/template-formula#62 |
@noelmcloughlin One thing to note about this is that sls files do not have to contain any yaml. If you want to consume raw yaml files as pillar data I think the best approach is to use the external pillar system: https://docs.saltstack.com/en/latest/topics/development/external_pillars.html It should be a fairly straight forward exercise to write an ext_pillar that reads your yaml files. |
Hi @dwoz |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue. |
Description of Issue/Question
By convention YAML markup files should use
.yaml
extension but salt refuses to read YAML file saved with this extension. This is non-intuitive, a barrier to adopting salt, and does not follow recommendation from https://yaml.org/faq.htmlPlease allow
.yaml
extension for pillar data.Setup
salt error for pillar data in saved as
/srv/pillar/template.yaml
Salt enforces
.sls
extension for files in YAML format.Here's the code in
salt/pillar/__init__.py
, which callssalt/fileclient.py
.Steps to Reproduce Issue
Versions Report
All versions
The text was updated successfully, but these errors were encountered: