hiera compatible refactoring
This commit is contained in:
@@ -11,32 +11,21 @@ factsignore = .svn CVS .git
|
||||
pluginsync=true
|
||||
factpath=$vardir/lib/facter
|
||||
|
||||
<% if (fqdn == scope.lookupvar("puppetmaster_server")) || (fqdn == scope.lookupvar("puppetmasterdev_server")) -%>
|
||||
#dbmigrate=true
|
||||
#dbadapter=<%= scope.lookupvar('puppetmaster_dbtype') %>
|
||||
#dbname=<%= scope.lookupvar('puppetmaster_dbname') %>
|
||||
#dbserver=<%= scope.lookupvar('puppetmaster_dbhost') %>
|
||||
#dbuser=<%= scope.lookupvar('puppetmaster_dbuser') %>
|
||||
#dbpassword=<%= scope.lookupvar('puppetmaster_dbpassword') %>
|
||||
|
||||
<% if server == "true" -%>
|
||||
[master]
|
||||
ssl_client_header = SSL_CLIENT_S_DN
|
||||
ssl_client_verify_header = SSL_CLIENT_VERIFY
|
||||
<% if scope.lookupvar('puppet::puppetmaster::dns_alt_names') -%>
|
||||
dns_alt_names=<%= scope.lookupvar('puppet::puppetmaster::dns_alt_names') %>
|
||||
<% if scope['puppet::dns_alt_names'] -%>
|
||||
dns_alt_names=<%= scope['puppet::dns_alt_names'] %>
|
||||
<% end -%>
|
||||
<% if @reports -%>
|
||||
reports=<%= @reports %>
|
||||
<% if scope['puppet::reports'] -%>
|
||||
reports=<%= scope['puppet::reports'] %>
|
||||
<% end -%>
|
||||
<% if scope.lookupvar('puppetmaster_reporturl') != false -%>
|
||||
reporturl=<%= scope.lookupvar('puppetmaster_reporturl') %>
|
||||
basemodulepath=<%= scope['puppet::basemodulepath'] %>
|
||||
storeconfigs=<%= scope['puppet::storeconfigs'] %>
|
||||
<% if scope['puppet::storeconfigs_backend'] -%>
|
||||
storeconfigs_backend=<%= scope['puppet::storeconfigs_backend'] %>
|
||||
<% end -%>
|
||||
modulepath=<%= scope['puppet::puppetmaster::modulepath'] %>
|
||||
storeconfigs=<%= scope['puppet::puppetmaster::storeconfigs'] %>
|
||||
<% if scope['puppet::puppetmaster::storeconfigs_backend'] -%>
|
||||
storeconfigs_backend=<%= scope['puppet::puppetmaster::storeconfigs_backend'] %>
|
||||
<% end -%>
|
||||
#rails_loglevel=info
|
||||
<% end -%>
|
||||
|
||||
[agent]
|
||||
|
||||
@@ -1,22 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
# $Id: puppetd_run.sh.erb 4177 2011-04-05 08:02:08Z uwaechte $
|
||||
|
||||
# a wrapper script, to run puppetd after a random time
|
||||
# this will be called by cron at the same time on each client,
|
||||
# but should not call the master at the same time as the others.
|
||||
|
||||
<% if norunifloggedin == true -%>
|
||||
<% if @norunifloggedin == true -%>
|
||||
# not running if users are logged in
|
||||
[[ $(who|wc -l) -gt 0 ]] && exit 0
|
||||
<% end -%>
|
||||
|
||||
export FACTERLIB="<%= scope.lookupvar("factpath") %>"
|
||||
#export FACTERLIB="<%= scope.lookupvar("factpath") %>"
|
||||
PATH="/opt/local/bin:/opt/local/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
||||
PUPPET=$(which puppet)
|
||||
[[ -e ${PUPPET} ]] || exit 1
|
||||
PUPPET="${PUPPET}"
|
||||
<% if run_if_ipmatch != "" -%>
|
||||
ISUNIIP=$(ifconfig |grep -c -e "<%= run_if_ipmatch %>")
|
||||
<% if @run_if_ipmatch != "" -%>
|
||||
ISUNIIP=$(ifconfig |grep -c -e "<%= @run_if_ipmatch %>")
|
||||
<% else -%>
|
||||
ISUNIIP=1
|
||||
<% end -%>
|
||||
@@ -54,7 +53,7 @@ if [ ${ISUNIIP} -gt 0 ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
MAXSLEEP=<%= maxsleep %> #How many seconds to wait maximally
|
||||
MAXSLEEP=<%= @maxsleep %> #How many seconds to wait maximally
|
||||
SLEEP=${RANDOM}
|
||||
I=${RANDOM}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user