diff options
author | varac <varacanero@zeromail.org> | 2012-11-04 20:45:53 +0100 |
---|---|---|
committer | varac <varacanero@zeromail.org> | 2012-11-04 20:45:53 +0100 |
commit | 0a3fdfff7bd8c11d6099f23aef505fbd5333ba99 (patch) | |
tree | 5fb2330d927a637d4000a6735c5c3f9d0bc24aec | |
parent | a58524af8a97d6c2eee8d26ccdf192fecb855fe9 (diff) |
deploy couchdb initscript, restart couchdb after config file change
-rw-r--r-- | puppet/modules/site_couchdb/manifests/configure.pp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/puppet/modules/site_couchdb/manifests/configure.pp b/puppet/modules/site_couchdb/manifests/configure.pp index 3adce785..4343cc2b 100644 --- a/puppet/modules/site_couchdb/manifests/configure.pp +++ b/puppet/modules/site_couchdb/manifests/configure.pp @@ -2,10 +2,17 @@ class site_couchdb::configure { Class[site_couchdb::package] -> Class[couchdb] class { 'couchdb': - require => Class['site_couchdb::package'], + require => Class['site_couchdb::package'], } + + + file { '/etc/init.d/couchdb': + source => 'puppet:///modules/site_couchdb/couchdb', + mode => '0755', + owner => 'root', + group => 'root', } - $adminpw = $site_couchdb::adminpw + $adminpw = $site_couchdb::adminpw file { '/etc/couchdb/local.d/admin.ini': content => "[admins] admin = $adminpw @@ -15,4 +22,12 @@ admin = $adminpw group => 'couchdb', notify => Service[couchdb] } + + + exec { '/etc/init.d/couchdb restart; sleep 3': + path => ['/bin', '/usr/bin',], + subscribe => File['/etc/couchdb/local.d/admin.ini', + '/etc/couchdb/local.ini'], + refreshonly => true + } } |