Skip to content

Commit

Permalink
Add task to stop rabbitmq service in rabbitmq role
Browse files Browse the repository at this point in the history
  • Loading branch information
kvelarde-itential committed Sep 21, 2024
1 parent 22290bc commit 392b5d7
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions roles/rabbitmq/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,17 @@
name: os
tags: install_base_os_packages

- name: Gather service facts
ansible.builtin.service_facts:

- name: Stop rabbitmq service
ansible.builtin.service:
name: rabbitmq-server
state: stopped
when:
- ansible_facts.services["rabbitmq-server.service"] is defined
- ansible_facts.services["rabbitmq-server.service"].state == "running"

- name: Include tasks to install RabbitMQ (online)
ansible.builtin.include_tasks:
file: rabbitmq-online.yml
Expand Down Expand Up @@ -61,12 +72,8 @@
ansible.builtin.include_tasks:
file: configure-clustering.yml
when: rabbitmq_cluster | bool
tags: rabbitmq_cluster

# Check if firewalld is running, if it is then open the appropriate ports
- name: Gather service facts
ansible.builtin.service_facts:

- name: Open Port on FirewallD Public Zone
ansible.posix.firewalld:
port: "{{ item }}"
Expand Down Expand Up @@ -152,7 +159,6 @@
ansible.builtin.include_tasks:
file: enable-clustering.yml
when: rabbitmq_cluster | bool
tags: rabbitmq_cluster

- name: Get installed erlang version
ansible.builtin.command:
Expand Down

0 comments on commit 392b5d7

Please sign in to comment.