diff --git a/templates/debian_mongod-init.conf.erb b/templates/debian_mongod-init.conf.erb index 6071181..fb4084c 100644 --- a/templates/debian_mongod-init.conf.erb +++ b/templates/debian_mongod-init.conf.erb @@ -57,7 +57,7 @@ NAME=mongodb_<%= @mongod_instance %> # http://docs.mongodb.org/manual/reference/configuration-options/ CONF="/etc/mongod_<%= @mongod_instance %>.conf" DBPATH=`awk -F= '/^dbpath=/{print $2}' "$CONF"` -PIDFILE=<%= scope.lookupvar('mongodb::params::dbdir') %>/mongod_<%= @mongod_instance %>/mongod.pid +PIDFILE=<%= scope.lookupvar('mongodb::pidfilepath') %>/mongod_<%= @mongod_instance %>/mongod.pid ENABLE_MONGODB=yes # Handle NUMA access to CPUs (SERVER-3574) @@ -89,8 +89,8 @@ DIETIME=10 # Time to wait for the server to die, in seconds # let some servers to die gracefully and # 'restart' will not work -DAEMONUSER=<%= scope.lookupvar('mongodb::params::run_as_user') %> -DAEMONGROUP=<%= scope.lookupvar('mongodb::params::run_as_group') %> +DAEMONUSER=<%= scope.lookupvar('mongodb::run_as_user') %> +DAEMONGROUP=<%= scope.lookupvar('mongodb::run_as_group') %> DAEMON_OPTS=${DAEMON_OPTS:-"--config $CONF"} set -e diff --git a/templates/debian_mongos-init.conf.erb b/templates/debian_mongos-init.conf.erb index a2ba7d6..3f4c173 100644 --- a/templates/debian_mongos-init.conf.erb +++ b/templates/debian_mongos-init.conf.erb @@ -77,8 +77,8 @@ DIETIME=10 # Time to wait for the server to die, in seconds # let some servers to die gracefully and # 'restart' will not work -DAEMONUSER=<%= scope.lookupvar('mongodb::params::run_as_user') %> -DAEMONGROUP=<%= scope.lookupvar('mongodb::params::run_as_group') %> +DAEMONUSER=<%= scope.lookupvar('mongodb::run_as_user') %> +DAEMONGROUP=<%= scope.lookupvar('mongodb::run_as_group') %> DAEMON_OPTS=${DAEMON_OPTS:-"--config $CONF"} set -e diff --git a/templates/logrotate.conf.erb b/templates/logrotate.conf.erb index 66bb408..fef316b 100644 --- a/templates/logrotate.conf.erb +++ b/templates/logrotate.conf.erb @@ -5,18 +5,18 @@ # Deleting MongoDB-generated files, and leaves the logrotate-files # alone (as they are named mongodb.log.[0-9].gz). -<%= scope.lookupvar('mongodb::params::logdir') %>/*.log { +<%= scope.lookupvar('mongodb::logdir') %>/*.log { daily missingok - rotate <%= scope.lookupvar('mongodb::params::logrotatenumber') %> + rotate <%= scope.lookupvar('mongodb::logrotatenumber') %> compress delaycompress notifempty - create 0640 <%= scope.lookupvar('mongodb::params::run_as_user') -%> <%= scope.lookupvar('mongodb::params::run_as_group') %> + create 0640 <%= scope.lookupvar('mongodb::run_as_user') -%> <%= scope.lookupvar('mongodb::run_as_group') %> sharedscripts postrotate killall -SIGUSR1 mongod killall -SIGUSR1 mongos - find <%= scope.lookupvar('mongodb::params::logdir') %> -type f -regex ".*\.\(log.[0-9].*-[0-9].*\)" -exec rm {} \; + find <%= scope.lookupvar('mongodb::logdir') %> -type f -regex ".*\.\(log.[0-9].*-[0-9].*\)" -exec rm {} \; endscript } diff --git a/templates/mongos.conf.erb b/templates/mongos.conf.erb index 3d27548..323aff6 100644 --- a/templates/mongos.conf.erb +++ b/templates/mongos.conf.erb @@ -1,9 +1,9 @@ # !!! generated by puppet !!! # mongos.conf -pidfilepath=<%= scope.lookupvar('mongodb::params::dbdir') %>/mongos_<%= @mongos_instance %>/mongos.pid +pidfilepath=<%= scope.lookupvar('mongodb::pidfilepath') %>/mongos_<%= @mongos_instance %>/mongos.pid -logpath=<%= scope.lookupvar('mongodb::params::logdir') %>/mongos_<%= @mongos_instance %>.log +logpath=<%= scope.lookupvar('mongodb::logdir') %>/mongos_<%= @mongos_instance %>.log logappend=<%= @mongos_logappend %> diff --git a/templates/redhat_mongod-init.conf.erb b/templates/redhat_mongod-init.conf.erb index 0e69e0f..297efc0 100644 --- a/templates/redhat_mongod-init.conf.erb +++ b/templates/redhat_mongod-init.conf.erb @@ -7,7 +7,7 @@ # description: Mongo is a scalable, document-oriented database. # processname: mongod # config: /etc/mongod_<%= @mongod_instance %>.conf -# pidfile: <%= scope.lookupvar('mongodb::params::dbdir') %>/mongod_<%= @mongod_instance %>/mongod.pid +# pidfile: <%= scope.lookupvar('mongodb::pidfilepath') %>/mongod_<%= @mongod_instance %>/mongod.pid . /etc/rc.d/init.d/functions @@ -26,8 +26,8 @@ DBPATH=`awk -F= '/^dbpath=/{print $2}' "$CONFIGFILE"` PIDFILE=`awk -F= '/^pidfilepath=/{print $2}' "$CONFIGFILE"` mongod=${MONGOD-/usr/bin/mongod} -MONGO_USER=<%= scope.lookupvar('mongodb::params::run_as_user') %> -MONGO_GROUP=<%= scope.lookupvar('mongodb::params::run_as_group') %> +MONGO_USER=<%= scope.lookupvar('mongodb::run_as_user') %> +MONGO_GROUP=<%= scope.lookupvar('mongodb::run_as_group') %> # Handle NUMA access to CPUs (SERVER-3574) # This verifies the existence of numactl as well as testing that the command works @@ -65,7 +65,7 @@ restart () { start } -ulimit -n <%= scope.lookupvar('mongodb::params::ulimit_nofiles') %> +ulimit -n <%= scope.lookupvar('mongodb::ulimit_nofiles') %> RETVAL=0 case "$1" in diff --git a/templates/redhat_mongos-init.conf.erb b/templates/redhat_mongos-init.conf.erb index 0d61779..6685a18 100644 --- a/templates/redhat_mongos-init.conf.erb +++ b/templates/redhat_mongos-init.conf.erb @@ -25,8 +25,8 @@ PIDFILE=`awk -F= '/^pidfilepath=/{print $2}' "$CONFIGFILE"` DBPATH=`dirname $PIDFILE` mongos=/usr/bin/mongos -MONGO_USER=<%= scope.lookupvar('mongodb::params::run_as_user') %> -MONGO_GROUP=<%= scope.lookupvar('mongodb::params::run_as_group') %> +MONGO_USER=<%= scope.lookupvar('mongodb::run_as_user') %> +MONGO_GROUP=<%= scope.lookupvar('mongodb::run_as_group') %> start() { @@ -52,7 +52,7 @@ restart () { start } -ulimit -n <%= scope.lookupvar('mongodb::params::ulimit_nofiles') %> +ulimit -n <%= scope.lookupvar('mongodb::ulimit_nofiles') %> RETVAL=0 case "$1" in