From a32840dd6524f481e4b337eeed8cc6485861bebb Mon Sep 17 00:00:00 2001 From: Matthew Thode Date: Thu, 12 May 2016 23:10:15 -0500 Subject: [PATCH] Add Gentoo to install_puppet.sh This adds support for installing puppet on Gentoo. I've packaged puppet-agent, which is upstream's package for general use (deb based). It is based on Puppet 4. Change-Id: If0c4bd83af822b0d0208a97561fffecbe495c5a9 --- install_puppet.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/install_puppet.sh b/install_puppet.sh index fcd94ac92e..cb76962ae8 100755 --- a/install_puppet.sh +++ b/install_puppet.sh @@ -42,6 +42,10 @@ function is_opensuse { cat /etc/os-release | grep -q -e "openSUSE" } +function is_gentoo { + [ -f /usr/bin/emerge ] +} + # dnf is a drop-in replacement for yum on Fedora>=22 YUM=yum if is_fedora && [[ $(lsb_release -rs) -ge 22 ]]; then @@ -218,6 +222,12 @@ function setup_puppet_opensuse { sed -i '/templatedir/d' /etc/puppet/puppet.conf } +function setup_puppet_gentoo { + emaint sync + emerge -q --jobs=4 puppet-agent + sed -i '/templatedir/d' /etc/puppetlabs/puppet/puppet.conf +} + # # pip setup # @@ -278,6 +288,8 @@ elif is_ubuntu; then setup_puppet_ubuntu elif is_opensuse; then setup_puppet_opensuse +elif is_gentoo; then + setup_puppet_gentoo else echo "*** Can not setup puppet: distribution not recognized" exit 1