-
-
Save ahmet2mir/5027e80dfdc23239ff40 to your computer and use it in GitHub Desktop.
Module in folder
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export FILEROOT=/srv/salt/base | |
mkdir /srv/salt/base/_modules/myfolder | |
cd /srv/salt/base/_modules/myfolder | |
cat >__init__.py <<EOF | |
def test(**dummy): | |
return {"reponse": "42"} | |
EOF | |
cat > dummy.py <<EOF | |
def othertest(**dummy): | |
return {"reponse": "42_1"} | |
EOF | |
salt xxx saltutil.sync_modules | |
-> __init__ and dummy are synced | |
salt xxx myfolder.test | |
-> success | |
salt xxx myfolder.dummy.othertest | |
-> failed |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment