Last active
September 28, 2023 13:29
-
-
Save marcothz/2675f0371e730e63cffb71561a2336c0 to your computer and use it in GitHub Desktop.
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
| # This requires ruby, so you might need to do a . ~/.asdf/asdf.sh | |
| # /opt/puppetlabs/pdk/share/cache/ruby/2.7.0/bin/r10k puppetfile install --moduledir=/etc/puppetlabs/code/environments/testing_dev_branch/modules | |
| SOURCE=/home/<user>/git/puppet-modules | |
| TARGET=/etc/puppetlabs/code/environments/testing_dev_branch | |
| IGNORE=--exclude='.git/' | |
| mkdir -p $TARGET/modules | |
| while true | |
| do | |
| # We can't run this all the time, because it will also delete the modules. | |
| # Which would make a full modules sync everytime. | |
| # rsync -avh --delete --force --delete-excluded $IGNORE $SOURCE/control-repo/ $TARGET | |
| rsync -avh $IGNORE $SOURCE/<git-repository-1>/ $TARGET/ | |
| rsync -avh $IGNORE $SOURCE/<git-repository-2>/ $TARGET/ | |
| sleep 2 | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This script can be used to sync the code from local Git repositories with the folder where the Puppet Server loads the code.
To install the Puppet Server in a VM, you can use these articles as a reference:
credits to @cgorshing