From b4701594b490d73238c4b69f78688999b019cca7 Mon Sep 17 00:00:00 2001 From: Marcos Santiago Date: Tue, 6 Sep 2022 16:44:42 +0200 Subject: [PATCH 1/3] feat: deprecate bintray and use official RabbitMQ apt repos --- files/rabbitmq.bintray.list | 4 ---- files/rabbitmq.list | 16 +++++++++++++++- tasks/install/ubuntu.yml | 17 ++++++++++++----- 3 files changed, 27 insertions(+), 10 deletions(-) delete mode 100644 files/rabbitmq.bintray.list diff --git a/files/rabbitmq.bintray.list b/files/rabbitmq.bintray.list deleted file mode 100644 index 72d1bc7..0000000 --- a/files/rabbitmq.bintray.list +++ /dev/null @@ -1,4 +0,0 @@ -deb https://dl.bintray.com/rabbitmq-erlang/debian bionic erlang -deb https://dl.bintray.com/rabbitmq-erlang/debian xenial erlang -deb https://dl.bintray.com/rabbitmq/debian bionic main -deb https://dl.bintray.com/rabbitmq/debian xenial main diff --git a/files/rabbitmq.list b/files/rabbitmq.list index c05ce43..ea00cb8 100644 --- a/files/rabbitmq.list +++ b/files/rabbitmq.list @@ -1,2 +1,16 @@ # Official repository of rabbitmq -deb http://www.rabbitmq.com/debian/ testing main +## https://www.rabbitmq.com/install-debian.html#apt-quick-start-packagecloud + +## Provides modern Erlang/OTP releases +## +## "bionic" as distribution name should work for any reasonably recent Ubuntu or Debian release. +## See the release to distribution mapping table in RabbitMQ doc guides to learn more. +deb http://ppa.launchpad.net/rabbitmq/rabbitmq-erlang/ubuntu bionic main +deb-src http://ppa.launchpad.net/rabbitmq/rabbitmq-erlang/ubuntu bionic main + +## Provides RabbitMQ +## +## "bionic" as distribution name should work for any reasonably recent Ubuntu or Debian release. +## See the release to distribution mapping table in RabbitMQ doc guides to learn more. +deb https://packagecloud.io/rabbitmq/rabbitmq-server/ubuntu/ bionic main +deb-src https://packagecloud.io/rabbitmq/rabbitmq-server/ubuntu/ bionic main diff --git a/tasks/install/ubuntu.yml b/tasks/install/ubuntu.yml index 335893d..0b26fbf 100644 --- a/tasks/install/ubuntu.yml +++ b/tasks/install/ubuntu.yml @@ -1,13 +1,20 @@ --- -- name: Add bintray rabbitmq repository's key +- name: Add the official Erlang repository's key apt_key: - url: "https://bintray.com/user/downloadSubjectPublicKey?username=rabbitmq" + url: "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xf77f1eda57ebb1cc" state: present when: not rabbitmq_os_package +- name: Add the PackageCloud RabbitMQ repository's key + apt_key: + url: "https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey" + state: present + when: not rabbitmq_os_package + + - name: Add bintray rabbitmq repository copy: - src: rabbitmq.bintray.list + src: rabbitmq.list dest: /etc/apt/sources.list.d/ backup: true when: not rabbitmq_os_package @@ -15,9 +22,9 @@ - name: Install rabbitmq-server apt: name: rabbitmq-server={{ rabbitmq_package }} - update_cache: true + update_cache: yes state: present - force: true + force: yes - name: Update locale command: update-locale LC_ALL=en_US.UTF-8 From 7f288dde144be6bb70bc038151a267964507fab9 Mon Sep 17 00:00:00 2001 From: Marcos Santiago Date: Tue, 6 Sep 2022 16:58:56 +0200 Subject: [PATCH 2/3] feat: use new ipaddr module --- templates/rabbitmq.conf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/rabbitmq.conf.j2 b/templates/rabbitmq.conf.j2 index ed05eba..d13a5b7 100644 --- a/templates/rabbitmq.conf.j2 +++ b/templates/rabbitmq.conf.j2 @@ -7,7 +7,7 @@ ## Networking ## ==================== -listeners.tcp.default = {{ rabbitmq_conf_tcp_listeners_address ~ ":" if rabbitmq_conf_tcp_listeners_address is defined and rabbitmq_conf_tcp_listeners_address|ipaddr else ":::" }}{{ rabbitmq_conf_tcp_listeners_port | default("5672")}} +listeners.tcp.default = {{ rabbitmq_conf_tcp_listeners_address ~ ":" if rabbitmq_conf_tcp_listeners_address is defined and rabbitmq_conf_tcp_listeners_address|ansible.utils.ipaddr else ":::" }}{{ rabbitmq_conf_tcp_listeners_port | default("5672")}} num_acceptors.tcp = {{ rabbitmq_conf_num_acceptors_tcp | default("10")}} {% if rabbitmq_newrelic_agent_enabled %} From 111881870f7a3a656b90ed1973fe3df22bc5fc59 Mon Sep 17 00:00:00 2001 From: Marcos Santiago Date: Mon, 4 Sep 2023 14:15:51 -0300 Subject: [PATCH 3/3] feat: update ubuntu apt distribution name --- files/rabbitmq.list | 16 ---------------- tasks/install/debian.yml | 6 +++--- tasks/install/ubuntu.yml | 9 ++++----- templates/rabbitmq.list.j2 | 16 ++++++++++++++++ 4 files changed, 23 insertions(+), 24 deletions(-) delete mode 100644 files/rabbitmq.list create mode 100644 templates/rabbitmq.list.j2 diff --git a/files/rabbitmq.list b/files/rabbitmq.list deleted file mode 100644 index ea00cb8..0000000 --- a/files/rabbitmq.list +++ /dev/null @@ -1,16 +0,0 @@ -# Official repository of rabbitmq -## https://www.rabbitmq.com/install-debian.html#apt-quick-start-packagecloud - -## Provides modern Erlang/OTP releases -## -## "bionic" as distribution name should work for any reasonably recent Ubuntu or Debian release. -## See the release to distribution mapping table in RabbitMQ doc guides to learn more. -deb http://ppa.launchpad.net/rabbitmq/rabbitmq-erlang/ubuntu bionic main -deb-src http://ppa.launchpad.net/rabbitmq/rabbitmq-erlang/ubuntu bionic main - -## Provides RabbitMQ -## -## "bionic" as distribution name should work for any reasonably recent Ubuntu or Debian release. -## See the release to distribution mapping table in RabbitMQ doc guides to learn more. -deb https://packagecloud.io/rabbitmq/rabbitmq-server/ubuntu/ bionic main -deb-src https://packagecloud.io/rabbitmq/rabbitmq-server/ubuntu/ bionic main diff --git a/tasks/install/debian.yml b/tasks/install/debian.yml index fd45d2b..8ca1678 100644 --- a/tasks/install/debian.yml +++ b/tasks/install/debian.yml @@ -6,9 +6,9 @@ when: not rabbitmq_os_package - name: Add the official rabbitmq repository - copy: - src: rabbitmq.list - dest: /etc/apt/sources.list.d/ + template: + src: rabbitmq.list.j2 + dest: /etc/apt/sources.list.d/rabbitmq.list backup: true when: not rabbitmq_os_package diff --git a/tasks/install/ubuntu.yml b/tasks/install/ubuntu.yml index 0b26fbf..f04f343 100644 --- a/tasks/install/ubuntu.yml +++ b/tasks/install/ubuntu.yml @@ -10,12 +10,11 @@ url: "https://packagecloud.io/rabbitmq/rabbitmq-server/gpgkey" state: present when: not rabbitmq_os_package - -- name: Add bintray rabbitmq repository - copy: - src: rabbitmq.list - dest: /etc/apt/sources.list.d/ +- name: Add the official rabbitmq repository + template: + src: rabbitmq.list.j2 + dest: /etc/apt/sources.list.d/rabbitmq.list backup: true when: not rabbitmq_os_package diff --git a/templates/rabbitmq.list.j2 b/templates/rabbitmq.list.j2 new file mode 100644 index 0000000..ae712da --- /dev/null +++ b/templates/rabbitmq.list.j2 @@ -0,0 +1,16 @@ +# Official repository of rabbitmq +## https://www.rabbitmq.com/install-debian.html#apt-quick-start-packagecloud + +## Provides modern Erlang/OTP releases +## +## "{{ ansible_distribution_release }}" as distribution name should work for any reasonably recent Ubuntu or Debian release. +## See the release to distribution mapping table in RabbitMQ doc guides to learn more. +deb http://ppa.launchpad.net/rabbitmq/rabbitmq-erlang/ubuntu {{ ansible_distribution_release|lower }} main +deb-src http://ppa.launchpad.net/rabbitmq/rabbitmq-erlang/ubuntu {{ ansible_distribution_release|lower }} main + +## Provides RabbitMQ +## +## "{{ ansible_distribution_release }}" as distribution name should work for any reasonably recent Ubuntu or Debian release. +## See the release to distribution mapping table in RabbitMQ doc guides to learn more. +deb https://packagecloud.io/rabbitmq/rabbitmq-server/ubuntu/ {{ ansible_distribution_release|lower }} main +deb-src https://packagecloud.io/rabbitmq/rabbitmq-server/ubuntu/ {{ ansible_distribution_release|lower }} main