From a22918f42ec4e7cd6c8899e5d0f7481d40178d5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20M=E4kinen?= Date: Mon, 25 Oct 2010 15:19:14 +0300 Subject: [PATCH] Forced to stop puppetmaster after installing puppetmaster package on debian and ubuntu. --- puppet/manifests/init.pp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/puppet/manifests/init.pp b/puppet/manifests/init.pp index 821bf59..c825593 100644 --- a/puppet/manifests/init.pp +++ b/puppet/manifests/init.pp @@ -20,6 +20,13 @@ class puppet::client { ensure => installed, } } + ubuntu,debian: { + package { "libaugeas-ruby": + name => regsubst($rubyversion, '^([0-9]+\.[0-9]+)\..*', 'libaugeas-ruby\1'), + ensure => installed, + before => Service["puppet"], + } + } } file { "/etc/puppet/puppet.conf": @@ -154,6 +161,18 @@ class puppet::server inherits puppet::client { default => "puppet-server", }, ensure => installed, + notify => $operatingsystem ? { + debian => Exec["stop-puppetmaster"], + ubuntu => Exec["stop-puppetmaster"], + default => undef, + }, + } + + exec { "stop-puppetmaster": + command => "service puppetmaster stop ; true", + path => "/bin:/usr/bin:/sbin:/usr/sbin", + refreshonly => true, + before => File["/etc/puppet/puppet.conf"], } case $operatingsystem {