diff --git a/misc/saltclass.py.diff b/misc/saltclass.py.diff new file mode 100644 index 0000000..7bfca2a --- /dev/null +++ b/misc/saltclass.py.diff @@ -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,