From 81f758c74ad496aa3edf148c9b900ddd7aa2a725 Mon Sep 17 00:00:00 2001 From: Antoine Cotten Date: Mon, 19 Jan 2015 10:13:01 +0100 Subject: [PATCH] formatting --- manifests/install/package.pp | 2 +- manifests/instance.pp | 46 ++++++++++++++++++------------------ 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/manifests/install/package.pp b/manifests/install/package.pp index a546a99..dac8e5c 100644 --- a/manifests/install/package.pp +++ b/manifests/install/package.pp @@ -36,7 +36,7 @@ file_line { 'fix broken tomcat init script': path => "/etc/init.d/${::tomcat::service_name_real}", line => "NAME=\"$(basename \$0)\"", - match => "^NAME=.*$", + match => "^NAME=.*\$", require => Package['tomcat server'] } } diff --git a/manifests/instance.pp b/manifests/instance.pp index 41dcda7..f0f7017 100644 --- a/manifests/instance.pp +++ b/manifests/instance.pp @@ -281,21 +281,21 @@ 'package' : { # manage systemd unit on compatible systems if $::tomcat::params::systemd { - if $::osfamily == 'Suse' { # SuSE - file { "${service_name_real} service unit": - path => "/usr/lib/systemd/system/${service_name_real}.service", - owner => 'root', - group => 'root', - content => template("${module_name}/instance/systemd_unit_suse.erb") - } - } else { # RHEL 7+ or Fedora - file { "${service_name_real} service unit": - path => "/usr/lib/systemd/system/${service_name_real}.service", - owner => 'root', - group => 'root', - content => template("${module_name}/instance/systemd_unit_rhel.erb") - } - } + if $::osfamily == 'Suse' { # SuSE + file { "${service_name_real} service unit": + path => "/usr/lib/systemd/system/${service_name_real}.service", + owner => 'root', + group => 'root', + content => template("${module_name}/instance/systemd_unit_suse.erb") + } + } else { # RHEL 7+ or Fedora + file { "${service_name_real} service unit": + path => "/usr/lib/systemd/system/${service_name_real}.service", + owner => 'root', + group => 'root', + content => template("${module_name}/instance/systemd_unit_rhel.erb") + } + } } else { # symlink main init script on all other distributions (Debian/Ubuntu, RHEL 6, SLES 11, ...) file { "${service_name_real} service unit": ensure => link, @@ -337,20 +337,20 @@ enable => $service_enable, require => File["${service_name_real} service unit"]; } - } + } # Debian/Ubuntu, RHEL 6, SLES 11, ... else { $start_command = "export CATALINA_BASE=${catalina_base_real}; /bin/su ${::tomcat::tomcat_user_real} -s /bin/bash -c '${service_start_real}'" $stop_command = "export CATALINA_BASE=${catalina_base_real}; /bin/su ${::tomcat::tomcat_user_real} -s /bin/bash -c '${service_stop_real}'" $status_command = "/usr/bin/pgrep -d , -u ${::tomcat::tomcat_user_real} -G ${::tomcat::tomcat_group_real} -f Dcatalina.base=${catalina_base_real}" - file { "${service_name_real} service unit": - path => "/etc/init.d/${service_name_real}", - owner => 'root', - group => 'root', - mode => '0755', - content => template("${module_name}/instance/tomcat_init_generic.erb") - } + file { "${service_name_real} service unit": + path => "/etc/init.d/${service_name_real}", + owner => 'root', + group => 'root', + mode => '0755', + content => template("${module_name}/instance/tomcat_init_generic.erb") + } service { $service_name_real: ensure => $service_ensure,