blob: aa8c55c68e702c284547e2a0a212428caae62e68 [file] [log] [blame]
{% set server = salt['grains.filter_by']({
'default': {
'ssl': {
'enabled': False,
'versions': ['tlsv1.2','tlsv1.1','tlsv1'],
'ca_file': '/etc/rabbitmq/ssl/ca.pem',
'cert_file': '/etc/rabbitmq/ssl/cert.pem',
'key_file': '/etc/rabbitmq/ssl/key.pem',
'all_file': '/etc/rabbitmq/ssl/all_file.pem'
},
'config_file': '/etc/rabbitmq/rabbitmq.config',
'env_file': '/etc/rabbitmq/rabbitmq-env.conf',
'cookie_file': '/var/lib/rabbitmq/.erlang.cookie',
'ulimit': 8192,
'limits_file': '/etc/systemd/system/rabbitmq-server.service.d/limits.conf',
'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'
}
}
},
'Arch': {
'pkg': 'rabbitmq',
'service': 'rabbitmq'
},
'Debian': {
'pkg': 'rabbitmq-server',
'service': 'rabbitmq-server',
'default_file': '/etc/default/rabbitmq-server'
},
'RedHat': {
'pkg': 'rabbitmq-server',
'service': 'rabbitmq-server'
},
}, merge=pillar.rabbitmq.get('server', {}), base='default') %}
{% set cluster = salt['grains.filter_by']({
'default': {
'partition_handling': 'autoheal',
},
}, merge=salt['pillar.get']('rabbitmq:cluster'), base='default') %}
{%- set rabbitmq_users = {} %}
{%- for host_name, host in server.get('host', {}).iteritems() %}
{%- do rabbitmq_users.update({host.user: [host]}) %}
{%- endfor %}
{%- set monitoring = salt['grains.filter_by']({
'default': {
'disk_full_threshold': 10,
'too_many_messages': 1024 * 1024,
},
}, grain='os_family', merge=salt['pillar.get']('rabbitmq:monitoring')) %}