summaryrefslogtreecommitdiff
path: root/puppet/modules/site_couchdb
diff options
context:
space:
mode:
authorvarac <varacanero@zeromail.org>2012-11-04 20:45:53 +0100
committervarac <varacanero@zeromail.org>2012-11-04 20:45:53 +0100
commit0a3fdfff7bd8c11d6099f23aef505fbd5333ba99 (patch)
tree5fb2330d927a637d4000a6735c5c3f9d0bc24aec /puppet/modules/site_couchdb
parenta58524af8a97d6c2eee8d26ccdf192fecb855fe9 (diff)
deploy couchdb initscript, restart couchdb after config file change
Diffstat (limited to 'puppet/modules/site_couchdb')
-rw-r--r--puppet/modules/site_couchdb/manifests/configure.pp19
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
+ }
}