rabbitmq.sls 792 Bytes
Newer Older
Guba Sándor committed
1 2 3
rabbitmq-server:
  pkg.installed:
    - name: rabbitmq-server
Bach Dániel committed
4 5 6 7 8
  {% if grains['os_family'] == 'RedHat' %}
  file.managed:
    - name: /etc/rabbitmq/rabbitmq-env.conf
    - contents: RABBITMQ_DIST_PORT=5671
  {% endif %}
9
  service.running:
Bach Dániel committed
10
    - enable: True
11 12
    - require:
      - pkg: rabbitmq-server
Bach Dániel committed
13 14 15
      {% if grains['os_family'] == 'RedHat' %}
      - file: rabbitmq-server
      {% endif %}
Guba Sándor committed
16 17 18 19 20

rabbitmq_user:
  rabbitmq_user.present:
    - name: {{ pillar['amqp']['user'] }}
    - password: {{ pillar['amqp']['password'] }}
Bach Dániel committed
21 22
    - require:
      - service: rabbitmq-server
Guba Sándor committed
23 24

virtual_host:
Bach Dániel committed
25 26 27 28 29 30 31 32
  rabbitmq_vhost.present:
    - name: {{ pillar['amqp']['vhost']}}
    - user: {{ pillar['amqp']['user'] }}
    - conf: .*
    - write: .*
    - read: .*
    - require:
      - service: rabbitmq-server