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
Allow templating local files #13873
Comments
Thanks. This would be a useful addition. |
This should work... IIRC, the file.managed state caches the file in the minion cache and renders the template there before comparing it to the targeted file. This might actually be a bug. I'll investigate. |
Ahh, OK, so I was mistaken. It appears that local files cannot be used as a source for file.managed states, period. So it's not simply a matter of templating not working. |
I would like to have a standalone "render" execution module so you can tap into the renderer system from arbitrary places. Plus it could be reused in other modules that are currently repeating the templating boilerplate code. I started on an implementation -- probably can't finish this week but I think I can make it happen before the Helium RC. |
OK, just FYI the rendering code is also in the cron.file state, I abstracted it a long time ago. So, if you make any changes, refs in salt/states/cron.py will also likely need to be updated. |
@whiteinge: me too--I envision using it to ease config file management during application development. C. R. Oldham, Engineer, SaltStack
|
I have been templating local files with My test case:
|
We've recently stumbled upon a similar issue. It would be very handy to have the
|
This is fixed in #14228, and I've added tests to keep this from regressing again. Thanks for reporting, we should be able to get this into the next release. |
💃 |
Currently file.managed does not allow templating of local files. There have been a few times I have had files inside of a git repo that I have cloned to a server and wanted to template them in the current context. Unfortunately that doesn't seem possible at the moment.
The text was updated successfully, but these errors were encountered: