Last active
January 30, 2017 13:04
-
-
Save tomkukral/e3af7a19b89284fddb1da64cbeec1197 to your computer and use it in GitHub Desktop.
Test salt fomula on Saltmaster
This file contains hidden or 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
| #!/bin/bash | |
| FORMULA=$1 | |
| if [ "$FORMULA" != "" ]; then | |
| rsync -rv --rsync-path "sudo rsync" ~/mi/formulas/${FORMULA}/ saltmaster:/root/salt-formula-${FORMULA}/ | |
| fi |
This file contains hidden or 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
| #!/bin/bash | |
| FORMULA="$1" | |
| if [ -d "/root/salt-formula-$FORMULA" ]; then | |
| echo "Going to replace packaged formula '$FORMULA'" | |
| rm -rfv /usr/share/salt-formulas/{env,reclass/service}/$FORMULA | |
| ln -v -s "/root/salt-formula-$FORMULA/$FORMULA" "/usr/share/salt-formulas/env/$FORMULA" | |
| ln -v -s "/root/salt-formula-$FORMULA/metadata/service/" "/usr/share/salt-formulas/reclass/service/$FORMULA" | |
| else | |
| echo "Stopped, please clone formula repo to /root/salt-formula-$FORMULA!" | |
| fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment