Skip to content

Commit

Permalink
Fix rabbitmq installation (#1903)
Browse files Browse the repository at this point in the history
* Attempt to fix rabbitmq installation

* Not used long names by default to avoid issues in Azure

* Not passed --longnames as var is used

Co-authored-by: atsikham <[email protected]>
  • Loading branch information
atsikham and atsikham authored Dec 14, 2020
1 parent 40c6581 commit b658c7f
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@
- specification.cluster.is_clustered | bool
- inventory_hostname == rabbitmq_master

- name: Set erlang_cookie fact for nodes
when:
- specification.cluster.is_clustered | bool
- inventory_hostname != rabbitmq_master
set_fact:
erlang_cookie: "{{ hostvars[rabbitmq_master]['erlang_cookie'] }}"

# Cookie is updated on master in previous step
- include_tasks: "update-erlang-cookie.yml"
when:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,6 @@
when: not cookie_file_stat.stat.exists
set_fact:
erlang_cookie: "{{ lookup('password', '/dev/null length=15 chars=ascii_letters') }}"
delegate_to: "{{ item }}"
delegate_facts: true
loop: "{{ ansible_play_hosts }}"

# Cookie must be applied on master first
- include_tasks: "update-erlang-cookie.yml"
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
---
- name: RabbitMQ | Set rabbitmq_master fact
set_fact:
rabbitmq_master: "{{ groups['rabbitmq'][0] }}"

- name: RabbitMQ | Check version
command: rabbitmqctl version
register: rabbitmq_version_current
Expand All @@ -12,6 +8,10 @@
include_vars:
file: roles/rabbitmq/defaults/main.yml

- name: RabbitMQ | Set rabbitmq_master fact
set_fact:
rabbitmq_master: "{{ groups['rabbitmq'][0] }}"

- name: RabbitMQ | Offline upgrade
when: rabbitmq_version_current.stdout != versions.general
block:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ specification:
ulimit_open_files: 65535

amqp_port: 5672
rabbitmq_use_longname: true
rabbitmq_use_longname: false
rabbitmq_policies: []
rabbitmq_plugins: []
custom_configurations: []
Expand Down

0 comments on commit b658c7f

Please sign in to comment.