paulbsd-salt/misc/saltclass.py.diff

34 lines
868 B
Diff
Raw Permalink Normal View History

2023-09-14 16:46:12 +02:00
--- /usr/local/lib/python3.11/dist-packages/salt/tops/saltclass.py.old 2023-08-13 11:32:29.466897018 +0200
2023-08-20 23:12:34 +02:00
+++ /usr/local/lib/python3.11/dist-packages/salt/tops/saltclass.py 2023-05-12 19:53:57.812134308 +0200
@@ -210,9 +210,12 @@
import logging
+import salt.config
+import salt.loader
import salt.utils.saltclass as sc
log = logging.getLogger(__name__)
+__salt__ = None
def __virtual__():
@@ -220,6 +223,8 @@
Only run if properly configured
"""
if __opts__["master_tops"].get("saltclass"):
+ global __salt__
+ __salt__ = salt.loader.minion_mods(__opts__)
return True
return False
@@ -258,7 +263,7 @@
salt_data = {
"__opts__": kwargs["opts"],
- "__salt__": {},
+ "__salt__": __salt__,
"__grains__": kwargs["grains"],
"__pillar__": {},
"minion_id": minion_id,