Don't touch existing manifests in puppet/bootstrap-server.sh

This commit is contained in:
Ossi Salmi 2012-04-18 16:39:25 +03:00
parent 9ca7751a0c
commit 594c24a174

View file

@ -37,12 +37,15 @@ FQDN="$(hostname -f)"
mkdir -p /etc/puppet/manifests/node
if [ ! -s /etc/puppet/manifests/site.pp ]; then
cat > /etc/puppet/manifests/site.pp << EOF
import "node/*.pp"
\$puppet_server = "${FQDN}"
EOF
fi
if [ ! -s /etc/puppet/manifests/node/${FQDN}.pp ]; then
cat > /etc/puppet/manifests/node/${FQDN}.pp << EOF
node "${FQDN}" {
@ -62,6 +65,7 @@ cat >> /etc/puppet/manifests/node/${FQDN}.pp << EOF
}
EOF
fi
puppet cert --keylength 4096 --list
puppet apply --no-report --tags bootstrap /etc/puppet/manifests/site.pp