From 8d68fb0dae8c896ee4dd2c24c72024de919611f6 Mon Sep 17 00:00:00 2001 From: Louis Abel Date: Wed, 19 Jul 2023 12:44:13 -0700 Subject: [PATCH] force rocky 9 or higher --- role-rocky-rabbitmq.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/role-rocky-rabbitmq.yml b/role-rocky-rabbitmq.yml index 52dd346..d1464fe 100644 --- a/role-rocky-rabbitmq.yml +++ b/role-rocky-rabbitmq.yml @@ -27,6 +27,14 @@ success_msg: "We are able to run on this node" fail_msg: "/etc/no-ansible exists - skipping run on this node" + - name: Verify if we are Rocky Linux 9 or higher + ansible.builtin.assert: + that: + - ansible_distribution_major_version|int >= 9 + - ansible_distribution | lower == "rocky" + success_msg: "We are on a supported system" + fail_msg: "Only Rocky Linux versions 9 or higher are supported." + # We have separate passwords per rabbitmq env - name: Import rabbitmq passwords ansible.builtin.include_vars: