From 870b87cf4077ec5cf043e6d582575563481cb08e Mon Sep 17 00:00:00 2001 From: "Wile E. Coyote" Date: Fri, 5 May 2017 08:08:06 +0000 Subject: [PATCH] Move riak test to init.pp --- modules/rhizo_base/manifests/init.pp | 26 +++++++++++++++++++++++--- modules/rhizo_base/manifests/riak.pp | 16 ---------------- 2 files changed, 23 insertions(+), 19 deletions(-) diff --git a/modules/rhizo_base/manifests/init.pp b/modules/rhizo_base/manifests/init.pp index d31994e..8acc4a3 100644 --- a/modules/rhizo_base/manifests/init.pp +++ b/modules/rhizo_base/manifests/init.pp @@ -153,9 +153,6 @@ class rhizo_base { include rhizo_base::fixes include rhizo_base::apt include rhizo_base::postgresql - if $operatingsystem != 'Debian' { - include rhizo_base::riak - } include rhizo_base::packages include rhizo_base::freeswitch include rhizo_base::runit @@ -168,6 +165,24 @@ class rhizo_base { } include rhizo_base::kiwi + if $vpn_ip_address == $riak_ip_address { + if $operatingsystem != 'Debian' { + file { '/etc/init.d/riak': + ensure => file, + owner => 'root', + group => 'root', + mode => '0755', + source => 'puppet:///modules/rhizo_base/etc/init.d/riak', + require => Class['::riak'], + notify => Exec['insserv'], + } + include rhizo_base::riak + } + } else { + file { '/etc/init.d/riak': + ensure => absent, + } + } #Rizhomatica scripts file { '/home/rhizomatica/bin': @@ -182,6 +197,11 @@ class rhizo_base { content => template('rhizo_base/vars.sh.erb'), } + file { "/etc/profile.d/rccn-functions.sh": + ensure => present, + content => template('rhizo_base/rccn-functions.sh.erb'), + } + file { '/var/rhizomatica': ensure => directory, } diff --git a/modules/rhizo_base/manifests/riak.pp b/modules/rhizo_base/manifests/riak.pp index cfa4a37..a2daff9 100644 --- a/modules/rhizo_base/manifests/riak.pp +++ b/modules/rhizo_base/manifests/riak.pp @@ -71,22 +71,6 @@ class rhizo_base::riak { } } - if $vpn_ip_address == $riak_ip_address { - file { '/etc/init.d/riak': - ensure => file, - owner => 'root', - group => 'root', - mode => '0755', - source => 'puppet:///modules/rhizo_base/etc/init.d/riak', - require => Class['::riak'], - notify => Exec['insserv'], - } - } else { - file { '/etc/init.d/riak': - ensure => absent, - } - } - exec { 'insserv': command => '/usr/lib/insserv/insserv', refreshonly => true,