Update install_modules to not need puppet

The only thing we actually use puppet for in install_modules, amazingly
enough, is doing a module list. That can be accomplished by doing a find
on /etc/puppet/modules.

Change-Id: I9c7969f2acd5a296a48d4fc0bbff47c0b4994ef1
This commit is contained in:
Monty Taylor 2018-08-02 16:08:24 -05:00
parent 9d73f5a138
commit 67376f4c4c
No known key found for this signature in database
GPG Key ID: 7BAE94BC7141A594

View File

@ -15,7 +15,8 @@
# under the License.
function puppet_version {
PATH=/opt/puppetlabs/bin:$PATH puppet --version | cut -d '.' -f 1
# Default to 3 for the cases, like bridge, where there is no puppet
(PATH=/opt/puppetlabs/bin:$PATH puppet --version || echo 3) | cut -d '.' -f 1
}
export PUPPET_VERSION=$(puppet_version)
@ -83,7 +84,7 @@ if [ -z "${!MODULES[*]}" ] && [ -z "${!SOURCE_MODULES[*]}" ] ; then
exit 0
fi
MODULE_LIST=`PATH=$PATH:/opt/puppetlabs/bin puppet module list --color=false`
MODULE_LIST=$(find $MODULE_PATH -maxdepth 1 -mindepth 1 -printf '%f\n')
# Install modules from source
for MOD in ${!SOURCE_MODULES[*]} ; do