From 726c00c541973bfe778068acbb6cacfa9dbc65b9 Mon Sep 17 00:00:00 2001 From: K Jonathan Harker Date: Wed, 2 Jul 2014 16:54:05 -0700 Subject: [PATCH] Add path to installing puppet 3 on nodepool nodes Instead of looking for an argument, change the install_puppet.sh script to look for an environment variable to switch to installing puppet3. Also export this environment variable in prepare_node.sh (albeit with a default value that does not install puppet3). Change-Id: I04bee2fa5bb70a4d763edb2f3d30f117cad5d65b --- install_puppet.sh | 3 ++- .../openstack_project/files/nodepool/scripts/prepare_node.sh | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/install_puppet.sh b/install_puppet.sh index f43063a12e..b52e3dc83c 100755 --- a/install_puppet.sh +++ b/install_puppet.sh @@ -23,7 +23,8 @@ # # Test condition to install puppet 3 -if [ "$1" = '--three' ]; then +PUPPET_VERSION=${PUPPET_VERSION:-2} +if [ "$PUPPET_VERSION" = '3' ]; then THREE=yes echo "Running in 3 mode" fi diff --git a/modules/openstack_project/files/nodepool/scripts/prepare_node.sh b/modules/openstack_project/files/nodepool/scripts/prepare_node.sh index 32d1488b55..13f35f80ac 100755 --- a/modules/openstack_project/files/nodepool/scripts/prepare_node.sh +++ b/modules/openstack_project/files/nodepool/scripts/prepare_node.sh @@ -25,6 +25,8 @@ PYPY=${PYPY:-false} ALL_MYSQL_PRIVS=${ALL_MYSQL_PRIVS:-false} GIT_BASE=${GIT_BASE:-git://git.openstack.org} +export PUPPET_VERSION=${PUPPET_VERSION:-'2'} + # Save the nameservers configured by our provider. cat >/tmp/forwarding.conf <