Merge "Drop rabbitmq_queue metrics for reply_* and *_fanout_* queues"
diff --git a/rabbitmq/map.jinja b/rabbitmq/map.jinja
index f169d0b..a5d2f4b 100644
--- a/rabbitmq/map.jinja
+++ b/rabbitmq/map.jinja
@@ -30,16 +30,16 @@
         }
     },
     'Arch': {
-        'pkgs': ['rabbitmq'],
+        'pkg': 'rabbitmq',
         'service': 'rabbitmq'
     },
     'Debian': {
-        'pkgs': ['rabbitmq-server', 'gettext-base'],
+        'pkg': 'rabbitmq-server',
         'service': 'rabbitmq-server',
         'default_file': '/etc/default/rabbitmq-server'
     },
     'RedHat': {
-        'pkgs': ['rabbitmq-server'],
+        'pkg': 'rabbitmq-server',
         'service': 'rabbitmq-server'
     },
 }, merge=pillar.rabbitmq.get('server', {}), base='default') %}
diff --git a/rabbitmq/server/service.sls b/rabbitmq/server/service.sls
index 1333144..034dfd5 100644
--- a/rabbitmq/server/service.sls
+++ b/rabbitmq/server/service.sls
@@ -1,9 +1,12 @@
 {%- from "rabbitmq/map.jinja" import server with context %}
 {%- if server.enabled %}
 
-rabbitmq_packages:
+rabbitmq_server:
   pkg.installed:
-  - names: {{ server.pkgs }}
+  - name: {{ server.pkg }}
+  {%- if server.version is defined %}
+  - version: {{ server.version }}
+  {%- endif %}
 
 rabbitmq_config:
   file.managed:
@@ -15,7 +18,7 @@
   - makedirs: True
   - mode: 440
   - require:
-    - pkg: rabbitmq_packages
+    - pkg: rabbitmq_server
 
 {%- if grains.os_family == 'Debian' %}
 
@@ -28,7 +31,7 @@
   - group: rabbitmq
   - mode: 440
   - require:
-    - pkg: rabbitmq_packages
+    - pkg: rabbitmq_server
 
 {%- endif %}
 
@@ -44,7 +47,7 @@
   - makedirs: True
   - mode: 0644
   - require:
-    - pkg: rabbitmq_packages
+    - pkg: rabbitmq_server
 
 {%- endif %}
 
@@ -57,7 +60,7 @@
   - name: sleep 30
   - user: root
   - require:
-    - pkg: rabbitmq_packages
+    - pkg: rabbitmq_server
     - file: rabbitmq_config
 {#    - cmd: enable_mgmt_plugin #}