Don't touch existing manifests in puppet/bootstrap-server.sh
This commit is contained in:
parent
9ca7751a0c
commit
594c24a174
1 changed files with 9 additions and 5 deletions
|
@ -37,24 +37,27 @@ FQDN="$(hostname -f)"
|
||||||
|
|
||||||
mkdir -p /etc/puppet/manifests/node
|
mkdir -p /etc/puppet/manifests/node
|
||||||
|
|
||||||
cat > /etc/puppet/manifests/site.pp << EOF
|
if [ ! -s /etc/puppet/manifests/site.pp ]; then
|
||||||
|
cat > /etc/puppet/manifests/site.pp << EOF
|
||||||
import "node/*.pp"
|
import "node/*.pp"
|
||||||
|
|
||||||
\$puppet_server = "${FQDN}"
|
\$puppet_server = "${FQDN}"
|
||||||
EOF
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
cat > /etc/puppet/manifests/node/${FQDN}.pp << EOF
|
if [ ! -s /etc/puppet/manifests/node/${FQDN}.pp ]; then
|
||||||
|
cat > /etc/puppet/manifests/node/${FQDN}.pp << EOF
|
||||||
node "${FQDN}" {
|
node "${FQDN}" {
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
if [ "${SERVER}" = "apache" -a -f /etc/redhat-release ]; then
|
if [ "${SERVER}" = "apache" -a -f /etc/redhat-release ]; then
|
||||||
cat >> /etc/puppet/manifests/node/${FQDN}.pp << EOF
|
cat >> /etc/puppet/manifests/node/${FQDN}.pp << EOF
|
||||||
include user::system
|
include user::system
|
||||||
realize(User["httpsd"], Group["httpsd"])
|
realize(User["httpsd"], Group["httpsd"])
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cat >> /etc/puppet/manifests/node/${FQDN}.pp << EOF
|
cat >> /etc/puppet/manifests/node/${FQDN}.pp << EOF
|
||||||
include puppet::server::${SERVER}
|
include puppet::server::${SERVER}
|
||||||
|
@ -62,6 +65,7 @@ cat >> /etc/puppet/manifests/node/${FQDN}.pp << EOF
|
||||||
|
|
||||||
}
|
}
|
||||||
EOF
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
puppet cert --keylength 4096 --list
|
puppet cert --keylength 4096 --list
|
||||||
puppet apply --no-report --tags bootstrap /etc/puppet/manifests/site.pp
|
puppet apply --no-report --tags bootstrap /etc/puppet/manifests/site.pp
|
||||||
|
|
Loading…
Add table
Reference in a new issue