From 67376f4c4cad55fbf49cc450ca3c862b89c1d7de Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Thu, 2 Aug 2018 16:08:24 -0500 Subject: [PATCH] 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 --- install_modules.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/install_modules.sh b/install_modules.sh index 8b048f7cd0..8d566099b3 100755 --- a/install_modules.sh +++ b/install_modules.sh @@ -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