change cluster_tag to env, require cluster_name

This commit is contained in:
Louis Abel 2024-04-02 12:04:42 -07:00
parent a3c96b897c
commit 47573d1181
Signed by: label
GPG Key ID: 2A6975660E424560
1 changed files with 8 additions and 1 deletions

View File

@ -1,7 +1,7 @@
---
# Stands up a RabbitMQ Cluster
- name: Configure RabbitMQ
hosts: rabbitmq_{{ rabbitmq_cluster_tag }}
hosts: rabbitmq_{{ rabbitmq_env }}
become: true
vars_files:
# vars/vaults/encpass.yml
@ -35,6 +35,13 @@
success_msg: "We are on a supported system"
fail_msg: "Only Rocky Linux versions 9 or higher are supported."
- name: Verify that rabbitmq cluster name is defined
ansible.builtin.assert:
that:
- rabbitmq_cluster_name|mandatory
success_msg: "Cluster name is {{ rabbitmq_cluster_name }}"
fail_msg: "Cluster name is not defined"
# We have separate passwords per rabbitmq env
- name: Import rabbitmq passwords
ansible.builtin.include_vars: