|
Colton Myers |
at Sep 1, 2015 at 5:45 pm
|
⇧ |
| |
Custom util modules are loaded into a special `__utils__` variable in
modules. It's possible we don't have it loading into output modules, so if
it doesn't work open an issue, ping me (@basepi) and we'll get it added.
Florian: should be doable but we might not be loading them into the py
renderer. Same as above, if __utils__ doesn't work, we should be able to
get it added.
--
Colton Myers
Core Engineer, SaltStack
@basepi on Twitter/Github/IRC
On Thu, Aug 27, 2015 at 9:48 AM, Iulian Ghionoiu wrote:Thanks for the suggestion.
How do you import a custom utils module inside a custom output module ?
On Wednesday, August 26, 2015 at 7:41:23 PM UTC+1, basepi wrote:You can sync custom utils modules via the `_utils` folder in your
file_roots (/srv/salt/_utils/ by default).
salt '*' saltutil.sync_utils
That's probably your best bet.
--
Colton Myers
Core Engineer, SaltStack
@basepi on Twitter/Github/IRC
On Fri, Aug 21, 2015 at 7:46 AM, Iulian Ghionoiu <iuli.cons...@gmail.com>
wrote:
Hi,
I have two custom Salt output modules that share 90% of the code.
My questions:
- What is the proper way to reuse the code ?
- Is there a way to create an load a custom salt utils module ?
- How can I import another file inside a Salt output module
Thanks,
Julian
--
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.
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.
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.
For more options, visit
https://groups.google.com/d/optout.