install_erlang:
  pkg.installed:
    - name: erlang
    
install_rabbitmq:
  pkg.installed: 
    - sources: 
      - rabbitmq: https://www.rabbitmq.com/releases/rabbitmq-server/v3.5.6/rabbitmq-server-3.5.6-1.noarch.rpm

enable_rabbitmq_on_startup:
  cmd.run:
    - name: chkconfig rabbitmq-server on
    
    
start_rabbitmq:    
  service.running:
    - name: rabbitmq-server
    
rabbitmq_vhost:
  rabbitmq_vhost.present:
    - name: pcawg_vhost
    - user: pcawg
    
rabbitmq_user:
  rabbitmq_user.present:
    - name: pcawg
    - password: pcawg
    - perms:
      - 'pcawg_vhost':
        - '.*'
        - '.*'
        - '.*'  
        
rabbitmq_consul_config:
  file.managed:
    - name: /etc/opt/consul.d/rabbitmq_consul.json
    - source: salt://rabbitmq/conf/rabbitmq_consul.json
    - user: root
    - group: root
    - mode: 644 
    - makedirs: True  
install_erlang:
  pkg.installed:
    - name: erlang
    
install_rabbitmq:
  pkg.installed: 
    - sources: 
      - rabbitmq: https://www.rabbitmq.com/releases/rabbitmq-server/v3.5.6/rabbitmq-server-3.5.6-1.noarch.rpm

enable_rabbitmq_on_startup:
  cmd.run:
    - name: chkconfig rabbitmq-server on
    
    
start_rabbitmq:    
  service.running:
    - name: rabbitmq-server
    
rabbitmq_vhost:
  rabbitmq_vhost.present:
    - name: pcawg_vhost
    - user: pcawg
    
rabbitmq_user:
  rabbitmq_user.present:
    - name: pcawg
    - password: pcawg
    - tags: 
      - management
    - perms:
      - 'pcawg_vhost':
        - '.*'
        - '.*'
        - '.*'
          
rabbitmq_management_plugin:
  rabbitmq_plugin.enabled:
    - name: rabbitmq_management
            
rabbitmq_consul_config:
  file.managed:
    - name: /etc/opt/consul.d/rabbitmq_consul.json
    - source: salt://rabbitmq/conf/rabbitmq_consul.json
    - user: root
    - group: root
    - mode: 644 
    - makedirs: True  
Update rabbitmq user to have management tag.
Update rabbitmq user to have management tag.

llevar/germline-regenotyper,llevar/germline-regenotyper