File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ mod 'module-data',
103103 :git => 'https://github.com/ripienaar/puppet-module-data.git'
104104
105105mod 'mongodb' ,
106- :commit => '14117ae3391862021555df8139c66fd04c13c0c3 ' ,
106+ :commit => '030100a176a72a32e265b77790d8d15407a13729 ' ,
107107 :git => 'https://github.com/puppetlabs/puppetlabs-mongodb.git'
108108
109109mod 'mysql' ,
Original file line number Diff line number Diff line change @@ -20,8 +20,5 @@ matrix:
2020 env : PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.6.0"
2121 - rvm : 1.8.7
2222 env : PUPPET_GEM_VERSION="~> 2.7.0" FACTER_GEM_VERSION="~> 1.7.0"
23- allow_failures :
24- - rvm : 2.1.6
25- env : PUPPET_GEM_VERSION="~> 4.0" STRICT_VARIABLES="yes"
2623notifications :
2724 email : false
Original file line number Diff line number Diff line change @@ -430,11 +430,13 @@ Default: <>
430430#####` ssl_ca `
431431Default: <>
432432
433-
434433#####` service_manage `
435434Whether or not the MongoDB service resource should be part of the catalog.
436435Default: true
437436
437+ #####` restart `
438+ Specifies whether the service should be restarted on config changes. Default: 'true'
439+
438440####Class: mongodb::mongos
439441class. This class should only be used if you want to implement sharding within
440442your mongodb deployment.
@@ -486,6 +488,9 @@ This setting can be used to specify if puppet should install the package or not
486488This setting can be used to specify the name of the package that should be installed.
487489If not specified, the module will use whatever service name is the default for your OS distro.
488490
491+ #####` restart `
492+ Specifies whether the service should be restarted on config changes. Default: 'true'
493+
489494### Definitions
490495
491496#### Definition: mongodb: db
Original file line number Diff line number Diff line change 1818 $fork = $mongodb::params::mongos_fork,
1919 $bind_ip = undef ,
2020 $port = undef ,
21+ $restart = $mongodb::params::mongos_restart,
2122) inherits mongodb::params {
2223
2324 if ($ensure == ' present' or $ensure == true ) {
24- anchor { 'mongodb::mongos::start' : }->
25- class { '::mongodb::mongos::install' : }->
26- class { '::mongodb::mongos::config' : }->
27- class { '::mongodb::mongos::service' : }->
28- anchor { 'mongodb::mongos::end' : }
25+ if $restart {
26+ anchor { 'mongodb::mongos::start' : }->
27+ class { 'mongodb::mongos::install' : }->
28+ # If $restart is true, notify the service on config changes (~>)
29+ class { 'mongodb::mongos::config' : }~>
30+ class { 'mongodb::mongos::service' : }->
31+ anchor { 'mongodb::mongos::end' : }
32+ } else {
33+ anchor { 'mongodb::mongos::start' : }->
34+ class { 'mongodb::mongos::install' : }->
35+ # If $restart is false, config changes won't restart the service (->)
36+ class { 'mongodb::mongos::config' : }->
37+ class { 'mongodb::mongos::service' : }->
38+ anchor { 'mongodb::mongos::end' : }
39+ }
2940 } else {
3041 anchor { 'mongodb::mongos::start' : }->
3142 class { '::mongodb::mongos::service' : }->
Original file line number Diff line number Diff line change 2020 owner => ' root' ,
2121 group => ' root' ,
2222 mode => ' 0644' ,
23- notify => Class[' mongodb::mongos::service' ]
2423 }
2524
2625 }
Original file line number Diff line number Diff line change 77 $service_enable = pick($mongodb::globals::service_enable , true )
88 $service_ensure = pick($mongodb::globals::service_ensure , ' running' )
99 $service_status = $mongodb::globals::service_status
10+ $restart = true
1011
1112 $mongos_service_manage = pick($mongodb::globals::mongos_service_manage , true )
1213 $mongos_service_enable = pick($mongodb::globals::mongos_service_enable , true )
1314 $mongos_service_ensure = pick($mongodb::globals::mongos_service_ensure , ' running' )
1415 $mongos_service_status = $mongodb::globals::mongos_service_status
1516 $mongos_configdb = ' 127.0.0.1:27019'
17+ $mongos_restart = true
1618
1719 # Amazon Linux's OS Family is 'Linux', operating system 'Amazon'.
1820 case $::osfamily {
Original file line number Diff line number Diff line change 6464 $ssl = undef ,
6565 $ssl_key = undef ,
6666 $ssl_ca = undef ,
67+ $restart = $mongodb::params::restart,
6768
6869 # Deprecated parameters
6970 $master = undef ,
7879 }
7980
8081 if ($ensure == ' present' or $ensure == true ) {
81- anchor { 'mongodb::server::start' : }->
82- class { '::mongodb::server::install' : }->
83- class { '::mongodb::server::config' : }->
84- class { '::mongodb::server::service' : }->
85- anchor { 'mongodb::server::end' : }
82+ if $restart {
83+ anchor { 'mongodb::server::start' : }->
84+ class { 'mongodb::server::install' : }->
85+ # If $restart is true, notify the service on config changes (~>)
86+ class { 'mongodb::server::config' : }~>
87+ class { 'mongodb::server::service' : }->
88+ anchor { 'mongodb::server::end' : }
89+ } else {
90+ anchor { 'mongodb::server::start' : }->
91+ class { 'mongodb::server::install' : }->
92+ # If $restart is false, config changes won't restart the service (->)
93+ class { 'mongodb::server::config' : }->
94+ class { 'mongodb::server::service' : }->
95+ anchor { 'mongodb::server::end' : }
96+ }
8697 } else {
8798 anchor { 'mongodb::server::start' : }->
8899 class { '::mongodb::server::service' : }->
Original file line number Diff line number Diff line change 9797 owner => ' root' ,
9898 group => ' root' ,
9999 mode => ' 0644' ,
100- notify => Class[' mongodb::server::service' ]
101100 }
102101
103102 file { $dbpath:
You can’t perform that action at this time.
0 commit comments