From: Frank Brehm Date: Wed, 18 Oct 2023 15:38:12 +0000 (+0200) Subject: Fixing postinstall-scripts/init-puppet X-Git-Tag: 1.8.0^2~32 X-Git-Url: https://git.uhu-banane.de/?a=commitdiff_plain;h=d2ea8d1e51156dd3f7f1da8e1de4328b168f8d85;p=pixelpark%2Fcreate-terraform.git Fixing postinstall-scripts/init-puppet --- diff --git a/postinstall-scripts/init-puppet b/postinstall-scripts/init-puppet index c60f2e4..ed7c11a 100755 --- a/postinstall-scripts/init-puppet +++ b/postinstall-scripts/init-puppet @@ -30,8 +30,8 @@ RELEASE= PKG_NAME="puppet-agent" PUPPET_BIN="/opt/puppetlabs/bin/puppet" PKG_INSTALLED="n" -ROLE="base_oel7" -PROJECT= +ROLE="default" +PROJECT="" INITIAL_INSTALL="n" PUPPET_SERVER="puppetmaster.pixelpark.com" @@ -132,6 +132,7 @@ get_options() { # Note the quotes around `$TEMP': they are essential! eval set -- "${tmp}" + eval_common_options "$@" if [[ "${DEBUG}" == 'y' ]] ; then declare -p REMAINING_OPTS declare -p REMAINING_ARGS @@ -145,7 +146,7 @@ get_options() { arg="${REMAINING_OPTS[$i]}" - case "$1" in + case "$arg" in -E|--env|--environment) j=$(( $i + 1 )) ENVIRONMENT=$( echo "${REMAINING_OPTS[$j]}" | tr '[:upper:]' '[:lower:]' ) @@ -463,23 +464,21 @@ generate_puppetconf() { [main] ca_ttl = 10y [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 - - environment = ${ENVIRONMENT} - report = true - pluginsync = true - splay = true - server = ${PUPPET_SERVER} - ca_server = ${PUPPET_CA_SERVER} - use_cached_catalog = false - usecacheonfailure = false - pluginsource = puppet:///plugins - pluginfactsource = puppet:///pluginfacts + ca_server = ${PUPPET_CA_SERVER} + certname = ${FQDN} + classfile = \$vardir/classes.txt + crl_refresh_interval = 1h + environment = ${ENVIRONMENT} + ignore_plugin_errors = true + number_of_facts_soft_limit = 10000 + pluginfactsource = puppet:///pluginfacts + pluginsource = puppet:///plugins + report = true + server = ${PUPPET_SERVER} + splay = true + use_cached_catalog = false + usecacheonfailure = false + EOF ) @@ -603,6 +602,8 @@ run_agent() { main() { get_options "$@" + set_locale "en_US.utf8" + check_for_root empty_line