blob: 9a24324525cad59516a678c419c9069024ea8dae [file] [log] [blame]
{% set server = salt['grains.filter_by']({
'Arch': {
'pkgs': ['rabbitmq'],
'service': 'rabbitmq',
'config_file': '/etc/rabbitmq/rabbitmq.config',
'cookie_file': '/var/lib/rabbitmq/.erlang.cookie',
'ulimit': 8192,
'disk_free_limit': 50000000,
'bind': {
'address': '0.0.0.0',
'port': '5672',
'ssl': {
'address': '0.0.0.0',
'port': '5671'
},
},
'management': {
'bind': {
'address': '127.0.0.1',
'port': '15672'
},
},
},
'Debian': {
'pkgs': ['rabbitmq-server', 'gettext-base'],
'service': 'rabbitmq-server',
'config_file': '/etc/rabbitmq/rabbitmq.config',
'cookie_file': '/var/lib/rabbitmq/.erlang.cookie',
'default_file': '/etc/default/rabbitmq-server',
'ulimit': 8192,
'disk_free_limit': 50000000,
'bind': {
'address': '0.0.0.0',
'port': '5672',
'ssl': {
'address': '0.0.0.0',
'port': '5671'
},
},
'management': {
'bind': {
'address': '127.0.0.1',
'port': '15672'
},
},
},
'RedHat': {
'pkgs': ['rabbitmq-server'],
'service': 'rabbitmq-server',
'config_file': '/etc/rabbitmq/rabbitmq.config',
'cookie_file': '/var/lib/rabbitmq/.erlang.cookie',
'ulimit': 8192,
'disk_free_limit': 50000000,
'bind': {
'address': '0.0.0.0',
'port': '5672',
'ssl': {
'address': '0.0.0.0',
'port': '5671'
},
},
'management': {
'bind': {
'address': '127.0.0.1',
'port': '15672'
},
},
},
}, merge=salt['pillar.get']('rabbitmq:server')) %}
{% set cluster = salt['pillar.get']('rabbitmq:cluster') %}
{%- set rabbitmq_users = {} %}
{%- for host_name, host in server.get('host', {}).iteritems() %}
{%- do rabbitmq_users.update({host.user: [host]}) %}
{%- endfor %}