added saltclass diff file
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
0db6152602
commit
6316419e75
33
misc/saltclass.py.diff
Normal file
33
misc/saltclass.py.diff
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
--- /tmp/saltclass.py 2023-08-13 11:32:29.466897018 +0200
|
||||||
|
+++ /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,
|
Loading…
Reference in New Issue
Block a user