]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
pubsub client config
authorStephen Gran <steve@lobefin.net>
Sun, 12 Jan 2014 18:51:33 +0000 (18:51 +0000)
committerStephen Gran <steve@lobefin.net>
Sun, 12 Jan 2014 18:51:33 +0000 (18:51 +0000)
Signed-off-by: Stephen Gran <steve@lobefin.net>
manifests/site.pp
modules/roles/manifests/pubsub/client.pp [new file with mode: 0644]
modules/roles/templates/pubsub/pubsub.conf.erb [new file with mode: 0644]
modules/samhain/templates/samhainrc.erb

index eecf27cd6768e3529a98a41521b0d25b196c6dd4..3d46f4ee0c6ea8ae0022611018750a7f455e377d 100644 (file)
@@ -39,6 +39,7 @@ node default {
        include autofs
        include lvm
        include multipath
+       include roles::pubsub::client
 
        if $::hostname in [pasquini,tristano,bertali,boito,rossini,salieri,dijkstra,luchesi,byrd,clementi,czerny,bm-bl1,bm-bl2,bm-bl3,bm-bl4,bm-bl5,bm-bl6,bm-bl7,bm-bl8,bm-bl9,bm-bl10,bm-bl11,bm-bl12,bm-bl13,bm-bl14] {
                include ganeti2
diff --git a/modules/roles/manifests/pubsub/client.pp b/modules/roles/manifests/pubsub/client.pp
new file mode 100644 (file)
index 0000000..3335ffe
--- /dev/null
@@ -0,0 +1,16 @@
+# = Class: roles::pubsub::client
+#
+# Client config files for pubsub client
+#
+# == Sample Usage:
+#
+#   include roles::pubsub::client
+#
+class roles::pubsub::client {
+
+       $rabbit_password = hkdf('/etc/puppet/secret', "mq-client-${name}")
+
+       file { '/etc/dsa/pubsub.conf':
+               content => template('roles/pubsub/pubsub.conf.erb')
+       }
+}
diff --git a/modules/roles/templates/pubsub/pubsub.conf.erb b/modules/roles/templates/pubsub/pubsub.conf.erb
new file mode 100644 (file)
index 0000000..0852463
--- /dev/null
@@ -0,0 +1,6 @@
+[dsa-homedirs]
+vhost=dsa
+topic=dsa.git.homedirs
+exchange=dsa
+username=<%= @fqdn %>
+password=<%= @rabbit_password %>
index cecc4ccdcc973d036797beb0afd9e7e8981b9f2b..e88a9ba1516df1566fe04c9cb026e97cc62346ec 100644 (file)
@@ -116,6 +116,7 @@ file=/etc/static-clients.conf
 # timestamps. Put it here as 'file', and in the ReadOnly section as 'dir'.
 #
 file=/etc
+file=/etc/dsa
 file=/etc/ssh
 file=/etc/network/run
 file=/etc/bind/zones
@@ -250,6 +251,7 @@ file=/etc/blkid.tab.old
 file=/etc/resolv.conf.dhclient-new
 
 # We handle these files with puppet - please to not be bothering us
+file=/etc/dsa/pubsub.conf
 file=/etc/nsswitch.conf
 file=/etc/timezone
 file=/etc/motd.tail