summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
+ }
}