Skip to content

Commit 066e020

Browse files
committed
Only install RubyGems with Puppet Version < 4.X
Only install RubyGems for Ubuntu if Puppet is < 4.x
1 parent ee807bc commit 066e020

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

ubuntu.sh

+6-4
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,12 @@ DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -
5050

5151
echo "Puppet installed!"
5252

53-
# Install RubyGems for the provider
54-
echo "Installing RubyGems..."
53+
# Install RubyGems for the provider, unless using puppet collections
5554
if [ "$DISTRIB_CODENAME" != "trusty" ]; then
55+
echo "Installing RubyGems..."
5656
apt-get --yes install rubygems >/dev/null
5757
fi
58-
gem install --no-ri --no-rdoc rubygems-update
59-
update_rubygems >/dev/null
58+
if [[ "${PUPPET_COLLECTION}" == "" ]]; then
59+
gem install --no-ri --no-rdoc rubygems-update
60+
update_rubygems >/dev/null
61+
fi

0 commit comments

Comments
 (0)