whytewolf / salt-debug Goto Github PK
View Code? Open in Web Editor NEWa crappy debug module for salt.
License: MIT License
a crappy debug module for salt.
License: MIT License
@whytewolf I am maintaining most of the new 'salt-winrepo-ng'
repo and ever since this added the ability to use and mix/in jinja2 templatized code, I find myself wondering, if it is correct and will it render, etc, when I write new 'salt-winrepo-ng'
sls files. And more than once I managed to submit broken sls files that had syntax errors or were missing parts, and if I had tried rendering them before submitting them, I could have avoided those. (see saltstack/salt#28899 )
To that end I tried writing a simple python loop to rneder the jinja2 in the sls file. ( see saltstack/salt#28898 )
But I didn't get very far. But now I have seen this simple 'salt-debug' module of yours. Do you think if it used/added the 'tpldir'
functionality (see saltstack/salt#28898 (comment) ) I could have it look at (or render) local files that aren't yet somewhere under the "file_roots://" on the master? (also see saltstack/salt#29063 (comment) )
Hoping that you can give helpful input on some of these?
I'm using saltenv
and pillarenv
different from base
for my development servers, so every time I'd have to specify saltenv
manually, which is rather tedious.
My servers have saltenv
in the minion config which means that their default saltenv
will be present in __opts__
. I don't know if there are other ways to configure default saltenv for a minion.
So the code could look like this:
def render(..., saltenv=None, ...):
"""
docstring
"""
if saltenv is None:
saltenv = __opts__.get('saltenv', 'base')
...
That would work for me. But again, I'm not sure if that's a 100% reliable way to obtain the default saltenv for a minion.
Hi Thomas.
sorry this is not an issue. but i don't found another way to leave a message for you.
I'm searching for one of your git project : https://github.com/whytewolf/salt-rsp-formula that is no more existing on github.
I'm new saltstack user and want to use it for applying security patchs on and infrastructure containing windows and redhat servers
could you please re share this project so i can take it as example ?
PS: if needed you can email me : [email protected]
Thanks and regards
Ridha.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.