Created
November 29, 2015 08:12
-
-
Save varesa/cc5b7be20d0ad21e44fc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
yum install -y https://yum.puppetlabs.com/puppetlabs-release-el-7.noarch.rpm | |
yum install -y puppet | |
cat << EOF > /etc/resolv.conf | |
nameserver 10.0.100.7 | |
search lab1.esav.fi | |
EOF | |
cat << EOF > /etc/puppet/puppet.conf | |
[main] | |
# The Puppet log directory. | |
# The default value is '\$vardir/log'. | |
logdir = /var/log/puppet | |
# Where Puppet PID files are kept. | |
# The default value is '\$vardir/run'. | |
rundir = /var/run/puppet | |
# Where SSL certificates are kept. | |
# The default value is '\$confdir/ssl'. | |
ssldir = \$vardir/ssl | |
[agent] | |
# The file in which puppetd stores a list of the classes | |
# associated with the retrieved configuratiion. Can be loaded in | |
# the separate ``puppet`` executable using the ``--loadclasses`` | |
# option. | |
# The default value is '\$confdir/classes.txt'. | |
classfile = \$vardir/classes.txt | |
# Where puppetd caches the local configuration. An | |
# extension indicating the cache format is added automatically. | |
# The default value is '\$confdir/localconfig'. | |
localconfig = \$vardir/localconfig | |
server = foreman.lab1.esav.fi | |
EOF | |
puppet agent -t | |
systemctl enable puppet | |
systemctl start puppet |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment