Skip to content

Commit

Permalink
Rescue by disabling long node names
Browse files Browse the repository at this point in the history
  • Loading branch information
to-bar committed Jan 15, 2021
1 parent 17093b2 commit 9eecd42
Showing 1 changed file with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,3 +85,21 @@
- name: RabbitMQ | Start an app on the node
when: inventory_hostname != rabbitmq_master
command: rabbitmqctl start_app

# The following two tasks were added to solve issue #1975.
# Till v0.9.0 the default for specification.rabbitmq_use_longname was 'true'.
- name: RabbitMQ | Ping node
command: rabbitmqctl ping
register: rabbitmqctl_ping
changed_when: false
failed_when: false

- name: RabbitMQ | Rescue by disabling long node names in /etc/rabbitmq/rabbitmq-env.conf
lineinfile:
path: /etc/rabbitmq/rabbitmq-env.conf
regexp: '^RABBITMQ_USE_LONGNAME='
line: RABBITMQ_USE_LONGNAME=False
backup: true
when:
- rabbitmqctl_ping.rc != 0
- ansible_hostname == ansible_fqdn

0 comments on commit 9eecd42

Please sign in to comment.