mirror of
https://github.com/rocky-linux/ansible-role-rabbitmq.git
synced 2024-12-04 18:36:26 +00:00
Update Sat Dec 26 20:52:59 MST 2020
This commit is contained in:
parent
de5dda78f4
commit
b4eb036e68
@ -9,16 +9,21 @@ rabbitmq_tls_link_dir: "/etc/rabbitmq/certs"
|
|||||||
rabbitmq_file_limit: 500000
|
rabbitmq_file_limit: 500000
|
||||||
|
|
||||||
# You are expected to set these yourself in your playbook
|
# You are expected to set these yourself in your playbook
|
||||||
#rabbitmq_cookie_staging: ...
|
rabbitmq_cookie: "NotASafeCookie"
|
||||||
#rabbitmq_cookie_production: ...
|
rabbitmq_admin_password: "NotASafePassword"
|
||||||
|
rabbitmq_cluster_name: "default"
|
||||||
# You are expected to set these yourself in your playbook
|
rabbitmq_cluster_list:
|
||||||
#rabbitmq_admin_password_staging: ...
|
- rabbitmq01.rockylinux.org
|
||||||
#rabbitmq_admin_password_production: ...
|
- rabbitmq02.rockylinux.org
|
||||||
|
- rabbitmq03.rockylinux.org
|
||||||
|
rabbitmq_env: "default"
|
||||||
|
|
||||||
|
# You can override this in your playbooks as well
|
||||||
rabbitmq_plugins:
|
rabbitmq_plugins:
|
||||||
- rabbitmq_amqp1_0
|
- rabbitmq_amqp1_0
|
||||||
- rabbitmq_auth_backend_ldap
|
- rabbitmq_auth_backend_ldap
|
||||||
- rabbitmq_auth_mechanism_ssl
|
- rabbitmq_auth_mechanism_ssl
|
||||||
- rabbitmq_management
|
- rabbitmq_management
|
||||||
- rabbitmq_mqtt
|
- rabbitmq_mqtt
|
||||||
|
- rabbitmq_federation
|
||||||
|
- rabbitmq_federation_management
|
||||||
|
12
files/selinux/rabbitmq_nrpe.te
Normal file
12
files/selinux/rabbitmq_nrpe.te
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
module rabbitmq_nrpe 1.0;
|
||||||
|
|
||||||
|
require {
|
||||||
|
type amqp_port_t;
|
||||||
|
type nrpe_t;
|
||||||
|
class tcp_socket name_connect;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#============= nrpe_t ==============
|
||||||
|
# let nagios plugin connect to rabbitmq management interface
|
||||||
|
allow nrpe_t amqp_port_t:tcp_socket name_connect;
|
6
handlers/main.yml
Normal file
6
handlers/main.yml
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
# handlers for rabbit
|
||||||
|
- name: restart_rabbitmq
|
||||||
|
service:
|
||||||
|
name: rabbitmq-server
|
||||||
|
state: restarted
|
1
tasks/federation.yml
Normal file
1
tasks/federation.yml
Normal file
@ -0,0 +1 @@
|
|||||||
|
---
|
@ -1,2 +1,49 @@
|
|||||||
---
|
---
|
||||||
# tasks
|
# RabbitMQ Tasks
|
||||||
|
- name: Install required packages for RabbitMQ
|
||||||
|
yum:
|
||||||
|
name: rabbitmq-server
|
||||||
|
state: present
|
||||||
|
|
||||||
|
- name: Deploy RabbitMQ configuration
|
||||||
|
template:
|
||||||
|
src: "etc/rabbitmq/{{ item }}.j2"
|
||||||
|
|
||||||
|
- name: Deploy erlang cookie
|
||||||
|
copy:
|
||||||
|
owner: rabbitmq
|
||||||
|
group: rabbitmq
|
||||||
|
mode: '0600'
|
||||||
|
content: "{{ rabbitmq_cookie }}"
|
||||||
|
dest: "/var/lib/rabbitmq/.erlang.cookie"
|
||||||
|
notify:
|
||||||
|
- restart_rabbitmq
|
||||||
|
|
||||||
|
- name: Create systemd override for RabbitMQ
|
||||||
|
file:
|
||||||
|
path: /etc/systemd/system/rabbitmq-server.service.d
|
||||||
|
state: directory
|
||||||
|
|
||||||
|
- name: Override nofile limit for RabbitMQ
|
||||||
|
copy:
|
||||||
|
dest: /etc/systemd/system/rabbitmq-server.service.d/99-override.conf
|
||||||
|
content: |
|
||||||
|
[Service]
|
||||||
|
LimitNOFILE={{ rabbitmq_cluster_file_limit }}
|
||||||
|
|
||||||
|
- name: Enable RabbitMQ Plugins
|
||||||
|
community.rabbitmq.rabbitmq_plugin:
|
||||||
|
names: "{{ rabbitmq_plugins | join(',') }}"
|
||||||
|
state: enabled
|
||||||
|
|
||||||
|
- name: Users Tasks
|
||||||
|
include_tasks: users.yml
|
||||||
|
|
||||||
|
- name: Vhost tasks
|
||||||
|
include_tasks: vhosts.yml
|
||||||
|
|
||||||
|
- name: Topic Tasks
|
||||||
|
include_tasks: topics.yml
|
||||||
|
|
||||||
|
- name: Federation Tasks
|
||||||
|
include_tasks: federation.yml
|
||||||
|
1
tasks/topics.yml
Normal file
1
tasks/topics.yml
Normal file
@ -0,0 +1 @@
|
|||||||
|
---
|
1
tasks/users.yml
Normal file
1
tasks/users.yml
Normal file
@ -0,0 +1 @@
|
|||||||
|
---
|
1
tasks/vhosts.yml
Normal file
1
tasks/vhosts.yml
Normal file
@ -0,0 +1 @@
|
|||||||
|
---
|
2
templates/etc/rabbitmq/rabbitmq-env.conf.j2
Normal file
2
templates/etc/rabbitmq/rabbitmq-env.conf.j2
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
NODENAME="{{ rabbitmq_cluster_name }}"
|
||||||
|
USE_LONGNAME="true"
|
Loading…
Reference in New Issue
Block a user