-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathinstall_puppet.sh
More file actions
36 lines (27 loc) · 850 Bytes
/
install_puppet.sh
File metadata and controls
36 lines (27 loc) · 850 Bytes
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
#!/bin/sh
if [ ! -f /etc/provisioned ] ; then
# remove strange manually placed repo file
/bin/rm -f /etc/yum.repos.d/puppetlabs*
# install Puppet 5.x release repo
/bin/yum -y install https://yum.puppet.com/puppet6/puppet6-release-el-7.noarch.rpm
if [ $? -ne 0 ] ; then
echo "Something went wrong installing the repository RPM"
exit 1
fi
# install / update puppet-agent
/bin/yum -y install puppet-agent
if [ $? -ne 0 ] ; then
echo "Something went wrong installing puppet-agent"
exit 1
fi
echo "10.13.38.2 puppet.vm puppet" >> /etc/hosts
echo "10.13.38.3 vault.vm vault" >> /etc/hosts
# Update curl and install unzip
/bin/yum -y install curl unzip
touch /etc/provisioned
cat << EOF > /etc/puppetlabs/puppet/csr_attributes.yaml
---
extension_requests:
pp_securitypolicy: "vaultok"
EOF
fi