Skip to content

Commit

Permalink
Add manage_service parameter
Browse files Browse the repository at this point in the history
 - Boolean dictating if puppet should manage the service
 - defaults to true
  • Loading branch information
Merritt Krakowitzer committed Jan 27, 2014
1 parent 14ea675 commit 23723a3
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
5 changes: 5 additions & 0 deletions jira.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,8 @@ jira::jvm_optional: -XX:-HeapDumpOnOutOfMemoryError
# for heap dumps add -XX:-HeapDumpOnOutOfMemoryError
# by default jira has 256m permgen which is a good setting to go with
jira::downloadURL: "http://www.atlassian.com/software/jira/downloads/binary/"

# Should puppet manage this service
# Boolean dictating if puppet should manage the service
jira::manage_service: true

3 changes: 3 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@
# Misc Settings
$downloadURL = 'http://www.atlassian.com/software/jira/downloads/binary/',

# Manage service
$manage_service = true,

) {

$webappdir = "${installdir}/atlassian-${product}-${version}-standalone"
Expand Down
20 changes: 10 additions & 10 deletions manifests/service.pp
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,15 @@
# limitations under the License.
#-----------------------------------------------------------------------------
class jira::service {

service { 'jira':
ensure => 'running',
provider => base,
start => '/etc/init.d/jira start',
restart => '/etc/init.d/jira restart',
stop => '/etc/init.d/jira stop',
status => '/etc/init.d/jira status',
require => Class['jira::config'],
if $jira::manage_service {
service { 'jira':
ensure => service_ensure,
provider => base,
start => '/etc/init.d/jira start',
restart => '/etc/init.d/jira restart',
stop => '/etc/init.d/jira stop',
status => '/etc/init.d/jira status',
require => Class['jira::config'],
}
}

}

0 comments on commit 23723a3

Please sign in to comment.