configure rabbitmq for openstack
authorMartin Zobel-Helas <zobel@debian.org>
Thu, 2 Jul 2015 12:13:28 +0000 (12:13 +0000)
committerMartin Zobel-Helas <zobel@debian.org>
Thu, 2 Jul 2015 12:13:28 +0000 (12:13 +0000)
Signed-off-by: Martin Zobel-Helas <zobel@debian.org>
hieradata/common.yaml
modules/roles/manifests/init.pp
modules/roles/manifests/keystone/rabbitmq.pp [new file with mode: 0644]

index 554966b..a198495 100644 (file)
@@ -44,6 +44,9 @@ roles:
     - kaufmann.debian.org
   keystone:
     - oyens.debian.org
+  keystone_rabbitmq:
+    - rainier.debian.org
+    - rapoport.debian.org
   memcached:
     - oyens.debian.org
   lists:
index e6176ea..a4ef596 100644 (file)
@@ -205,6 +205,9 @@ class roles {
        if has_role('keystone') {
                include roles::keystone
        }
+       if has_role('keystone_rabbitmq') {
+               include roles::keystone::rabbitmq
+       }
 
        if has_role('memcached') {
                include roles::memcached
diff --git a/modules/roles/manifests/keystone/rabbitmq.pp b/modules/roles/manifests/keystone/rabbitmq.pp
new file mode 100644 (file)
index 0000000..65d6b29
--- /dev/null
@@ -0,0 +1,21 @@
+class roles::keystone::rabbitmq {
+
+       include roles::openstack::params
+
+       $rabbit_pass     = $roles::openstack::params::rabbit_pass
+
+       rabbitmq_vhost { 'keystone':
+               ensure   => present,
+       }
+
+       rabbitmq_user { 'openstack':
+               admin    => false,
+               password => $rabbit_pass,
+       }
+
+       rabbitmq_user_permissions { 'openstack@keystone':
+               configure_permission => '.*',
+               read_permission      => '.*',
+               write_permission     => '.*',
+       }
+}