Merge "Add rabbitmq distro install support for EL"

This commit is contained in:
Zuul 2024-05-04 09:38:05 +00:00 committed by Gerrit Code Review
commit ce5c559526
2 changed files with 29 additions and 7 deletions

View File

@ -13,10 +13,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Fail if installation method is not 'external_repo'
- name: Fail if installation method is not 'external_repo' or 'distro'
fail:
msg: "The only supported rabbitmq_install_method for RedHat is 'external_repo'."
when: rabbitmq_install_method != 'external_repo'
msg: "The only supported rabbitmq_install_method for RedHat is 'external_repo' and 'distro'."
when:
- rabbitmq_install_method != 'external_repo'
- rabbitmq_install_method != 'distro'
- name: Configure repositories
yum_repository:
@ -29,6 +31,17 @@
with_items:
- "{{ rabbitmq_erlang_repo }}"
- "{{ rabbitmq_repo }}"
when:
- rabbitmq_install_method == 'external_repo'
tags:
- rabbitmq-repos
- name: Install RabbitMQ packages
yum:
name: "{{ rabbitmq_distro_extras_repo }}"
state: "{{ rabbitmq_package_state }}"
when:
- rabbitmq_install_method == 'distro'
tags:
- rabbitmq-repos

View File

@ -46,7 +46,16 @@ _rabbitmq_erlang_repo:
- https://dl.cloudsmith.io/public/rabbitmq/rabbitmq-erlang/gpg.E495BB49CC4BBE5B.key
- https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc
rabbitmq_distro_packages:
- openssl
- "erlang-{{ _erlang_package_version }}.{{ _erlang_package_dist_tag }}.{{ ansible_facts['architecture'] }}"
- "rabbitmq-server-{{ rabbitmq_package_version }}.{{ _rabbitmq_package_dist_tag }}.noarch"
rabbitmq_distro_packages_mapping:
distro:
- openssl
- rabbitmq-server
external_repo:
- openssl
- "erlang-{{ _erlang_package_version }}.{{ _erlang_package_dist_tag }}.{{ ansible_facts['architecture'] }}"
- "rabbitmq-server-{{ rabbitmq_package_version }}.{{ _rabbitmq_package_dist_tag }}.noarch"
rabbitmq_distro_packages: "{{ rabbitmq_distro_packages_mapping[rabbitmq_install_method] }}"
rabbitmq_distro_extras_repo:
- centos-release-rabbitmq-*