summaryrefslogtreecommitdiff
path: root/puppet/modules/couchdb/templates/admin.ini.erb
diff options
context:
space:
mode:
Diffstat (limited to 'puppet/modules/couchdb/templates/admin.ini.erb')
-rw-r--r--puppet/modules/couchdb/templates/admin.ini.erb9
1 files changed, 9 insertions, 0 deletions
diff --git a/puppet/modules/couchdb/templates/admin.ini.erb b/puppet/modules/couchdb/templates/admin.ini.erb
new file mode 100644
index 00000000..479f8bfc
--- /dev/null
+++ b/puppet/modules/couchdb/templates/admin.ini.erb
@@ -0,0 +1,9 @@
+<%- require 'digest' -%>
+[admins]
+admin = <%= @admin_hash %>
+
+[couchdb]
+<%- # uuid uniquely identifies this couchdb instance. if not set, couchdb will set a random one
+ # but we want a stable one so that this config file doesn't change all the time.
+ # Md5 of hostname and ipaddress seems reasonable, but it could be based on anything. -%>
+uuid = <%= Digest::MD5.hexdigest(Facter.value("hostname") + Facter.value("ipaddress")) %>