Giter Club home page Giter Club logo

ansible-role-rabbitmq's Introduction

Ansible Role: RabbitMQ

CI

Installs RabbitMQ on Linux.

Requirements

(Red Hat / CentOS only) Requires the EPEL repository, which can be installed with the geerlingguy.repo-epel role.

Role Variables

Available variables are listed below, along with default values (see defaults/main.yml):

rabbitmq_daemon: rabbitmq-server
rabbitmq_state: started
rabbitmq_enabled: true

Controls the RabbitMQ daemon's state and whether it starts at boot.

rabbitmq_version: "3.9.13"

The RabbitMQ version to install.

rabbitmq_rpm: "rabbitmq-server-{{ rabbitmq_version }}-1.el{{ ansible_distribution_major_version }}.noarch.rpm"
rabbitmq_rpm_url: "https://packagecloud.io/rabbitmq/rabbitmq-server/packages/el/{{ ansible_distribution_major_version }}/{{ rabbitmq_rpm }}/download"

(RedHat/CentOS only) Controls the .rpm to install.

rabbitmq_deb: "rabbitmq-server_{{ rabbitmq_version }}-1_all.deb"
rabbitmq_deb_url: "https://packagecloud.io/rabbitmq/rabbitmq-server/packages/{{ ansible_distribution | lower }}/{{ ansible_distribution_release }}/{{ rabbitmq_deb }}/download"

(Debian/Ubuntu only) Controls the .deb to install.

Dependencies

None.

Example Playbook

- hosts: rabbitmq
  roles:
    - name: geerlingguy.repo-epel
      when: ansible_os_family == 'RedHat'
    - geerlingguy.rabbitmq

License

MIT / BSD

Author Information

This role was created in 2017 by Jeff Geerling, author of Ansible for DevOps.

ansible-role-rabbitmq's People

Contributors

gdubicki avatar geerlingguy avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ansible-role-rabbitmq's Issues

rabbitmq installation failed because of 'nothing provides socat needed by rabbitmq-server' - centos8

I try to install RabbitMQ on a Centos8 VM.
But it fails.
Here the called roles in my playbook

- { role: rockandska.erlang, become: yes }
- { role: rabbitmq.deps, become: yes } # install socat and logrotate => https://github.com/rabbitmq/chef-cookbook/issues/355
- { role: geerlingguy.repo-epel, become: yes }
- { role: geerlingguy.rabbitmq, become: yes }

The issue

# TASK [geerlingguy.rabbitmq : Ensure RabbitMQ is installed.] ********************
# fatal: [nnbus]: FAILED! => {"changed": false, "failures": [], "msg": "Depsolve Error occured: \n Problem: conflicting requests\n  - nothing provides socat needed by rabbitmq-server-3.8.3-1.el8.noarch", "rc": 1, "results": []}
# [nnbus] TASK: geerlingguy.rabbitmq : Ensure RabbitMQ is installed. (debug)> User interrupted execution
# ERROR: Job failed: exit code 1

The concerned code ?

- name: Ensure RabbitMQ is installed.
  yum:
    name: "/tmp/{{ rabbitmq_rpm }}"
    state: "present"

Installation fails on Rocky 9 with Signature not supported

I am not sure if Rocky 9 is supported or not. I tried to use the role to install RabbitMQ on Rocky 9.3 and I get the following error.

task path: /tmp/galaxy/roles/geerlingguy.rabbitmq/tasks/setup-RedHat.yml:7
failed: [rabbitmq01] (item=https://packagecloud.io/gpg.key) => changed=false
ansible_loop_var: item
item: https://packagecloud.io/gpg.key
msg: |-
warning: Signature not supported. Hash algorithm SHA1 not available.
error: /tmp/tmpmr4u5_j7: key 1 import failed.
failed: [rabbitmq01] (item=https://packagecloud.io/rabbitmq/erlang/gpgkey) => changed=false
ansible_loop_var: item
item: https://packagecloud.io/rabbitmq/erlang/gpgkey
msg: |-
warning: Signature not supported. Hash algorithm SHA1 not available.
error: /tmp/tmpkyu1vb90: key 1 import failed.
failed: [rabbitmq01] (item=https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey) => changed=false
ansible_loop_var: item
item: https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey
msg: |-
warning: Signature not supported. Hash algorithm SHA1 not available.
error: /tmp/tmp7hl9751l: key 1 import failed.
changed: [rabbitmq01] => (item=https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc) => changed=true
ansible_loop_var: item
item: https://github.com/rabbitmq/signing-keys/releases/download/2.0/rabbitmq-release-signing-key.asc

Gnome environment is being installed

In Ubuntu Server 20.04 (and probably others) erlang dependency installs Gnome GUI environment.
Role should install erlang-nox instead of erlang or at least give a way to choose betwwen.

╰─$ apt-cache search erlang-nox
erlang-nox - Erlang/OTP applications that don't require X Window System

Ubuntu 20.04 (focal) doesn't supported by https://packagecloud.io

When trying to run the role on Ubuntu 20.04, there is an error:

FAILED! => {"changed": false, "dest": "/tmp/rabbitmq-server_3.6.11-1_all.deb", "elapsed": 0, "msg": "Request failed", "response": "HTTP Error 404: Not Found", "status_code": 404, "url": "https://packagecloud.io/rabbitmq/rabbitmq-server/packages/ubuntu/focal/rabbitmq-server_3.6.11-1_all.deb/download"}

From looking on https://packagecloud.io it doesn't seem like it support focal

No package matching 'erlang' found available

Consider add step enable epel for centos

[root@seeder ansible]# ssh [email protected]
Last login: Thu Jun 23 11:17:41 2022 from 172.20.23.123
[root@rabbitmq ~]# yum install -y erlang
Failed to set locale, defaulting to C
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.vhost.vn
 * extras: mirrors.vhost.vn
 * updates: mirrors.vhost.vn
No package erlang available.
Error: Nothing to do
[root@rabbitmq ~]# cat /etc/os-release 
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"


TASK [Gathering Facts] **************************************************************************************************************************************************************************************************
ok: [172.20.23.7]

TASK [rabbitmq_role : include_tasks] ************************************************************************************************************************************************************************************
included: /root/tgs-release-gitbook/ansible/rabbitmq_role/tasks/setup-RedHat.yml for 172.20.23.7

TASK [rabbitmq_role : Ensure erlang is installed.] **********************************************************************************************************************************************************************
fatal: [172.20.23.7]: FAILED! => {"changed": false, "msg": "No package matching 'erlang' found available, installed or updated", "rc": 126, "results": ["No package matching 'erlang' found available, installed or updated"]}

Issue on CentOS 7 with Erlang version.

@geerlingguy

There are problems on CentOS 7 When trying to install a version of RabbitMQ 3.6.15 and above which requires a minimum Erlang of 19.3 see https://www.rabbitmq.com/which-erlang.html. The default CentOS repo currently only has R16B03.

At the moment to get around this we just install the relevant Erlang manually but it would be great to have an option within this to choose to install Erlang from source or install from RabbitMQ Erlang repo https://github.com/rabbitmq/erlang-rpm or system repo by default.

Would you accept a pull request with a configurable Erlang install on this repo or could be that you choose this should be a separate repo?

The role does not exist in debian/buster64

When I try to install the role in a debian/buster64. I get

fatal: []: FAILED! => {"changed": false, "dest": "/tmp/rabbitmq-server_3.6.16-1_all.deb", "elapsed": 0, "msg": "Request failed", "response": "HTTP Error 404: Not Found", "status_code": 404, "url": "https://packagecloud.io/rabbitmq/rabbitmq-server/packages/debian/buster/rabbitmq-server_3.6.16-1_all.deb/download"}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.