-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall-puppet-agent.sh
executable file
·37 lines (31 loc) · 1.15 KB
/
install-puppet-agent.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/usr/bin/env bash
set -e
DISTRO_CODENAME="$(lsb_release -sc)"
if [ -n "$(command -v rpm)" ]; then
rpm -Uvh https://yum.puppet.com/puppet7-release-el-7.noarch.rpm
yum -y install puppet-agent
elif [ -n "$(command -v dpkg)" ]; then
pushd /tmp
wget https://apt.puppetlabs.com/puppet7-release-$DISTRO_CODENAME.deb
dpkg -i puppet7-release-$DISTRO_CODENAME.deb
rm puppet7-release-$DISTRO_CODENAME.deb
popd
apt-get update
apt-get install -y puppet-agent
else
echo "Could not locate rpm or dpkg"
exit 1
fi
/opt/puppetlabs/bin/puppet module install puppetlabs-stdlib
/opt/puppetlabs/bin/puppet module install saz-ssh
/opt/puppetlabs/bin/puppet module install domkrm-ufw
/opt/puppetlabs/bin/puppet module install puppetlabs-sshkeys_core
/opt/puppetlabs/bin/puppet module install puppetlabs-vcsrepo
/opt/puppetlabs/bin/puppet module install puppetlabs-augeas_core
/opt/puppetlabs/bin/puppet module install puppet-nginx
/opt/puppetlabs/bin/puppet module install puppet-letsencrypt
if [ -n "$(command -v yum)" ]; then
/opt/puppetlabs/bin/puppet module install puppet-yum
elif [ -n "$(command -v apt)" ]; then
/opt/puppetlabs/bin/puppet module install puppetlabs-apt
fi