From c7f65dd0434014c2ac93cf5a417fb39659a46c42 Mon Sep 17 00:00:00 2001 From: sylvainfaivre Date: Thu, 11 Jan 2024 15:10:58 +0100 Subject: [PATCH] fix: recursive requisite rabbitmqadmin with latest salt builds --- rabbitmq/config/plugins/install.sls | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/rabbitmq/config/plugins/install.sls b/rabbitmq/config/plugins/install.sls index 49b84312..4ec0ba3c 100644 --- a/rabbitmq/config/plugins/install.sls +++ b/rabbitmq/config/plugins/install.sls @@ -26,20 +26,15 @@ rabbitmq-config-plugins-enabled-{{ name }}-{{ plugin }}: rabbitmq-config-plugins-{{ name }}-rabbitmqadmin-install: cmd.run: - - name : curl -k -L http://127.0.0.1:15672/cli/rabbitmqadmin -o /usr/local/sbin/rabbitmqadmin - - unless: test -x /usr/local/sbin/rabbitmqadmin + {%- set rabbitmqadmin = "/usr/local/sbin/rabbitmqadmin" %} + - name: > + curl -k -L http://127.0.0.1:15672/cli/rabbitmqadmin -o {{ rabbitmqadmin }} + && chown root:{{ rabbitmq.rootgroup }} {{ rabbitmqadmin }} + && chmod 755 {{ rabbitmqadmin }} + - unless: test -x {{ rabbitmqadmin }} - onlyif: /usr/sbin/rabbitmq-plugins --node {{ name }} is_enabled rabbitmq_management - require: - sls: {{ sls_service_running }} - file.managed: - - name: /usr/local/sbin/rabbitmqadmin - - user: root - - force: false - - replace: false - - group: {{ rabbitmq.rootgroup }} - - mode: 755 - - require: - - cmd : rabbitmq-config-plugins-{{ name }}-rabbitmqadmin-install {%- endif %} {%- endfor %}