From 277979ce4ba065f205f20d1a0bf5e1df502bc8a6 Mon Sep 17 00:00:00 2001 From: Damien Dart Date: Tue, 24 Sep 2024 23:31:38 +0100 Subject: [PATCH] Update "erlang_and_elixir" Ansible role. Update the "erlang_and_elixir" Ansible role to use the "ansible.builtin.deb822_repository" module. --- roles/erlang_and_elixir/tasks/main.yml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/roles/erlang_and_elixir/tasks/main.yml b/roles/erlang_and_elixir/tasks/main.yml index 80ea109..8cffa6c 100644 --- a/roles/erlang_and_elixir/tasks/main.yml +++ b/roles/erlang_and_elixir/tasks/main.yml @@ -5,15 +5,29 @@ # more information, please refer to the accompanying "UNLICENCE" file. --- -- name: 'Ensure the Erlang Solutions package signing key is present for APT' +- name: 'Ensure old Erlang Solutions package signing key is not present for APT' ansible.builtin.apt_key: - state: 'present' + state: 'absent' url: 'https://packages.erlang-solutions.com/ubuntu/erlang_solutions.asc' -- name: 'Ensure Erlang Solutions repository is present in APT sources list' +- name: 'Ensure old Erlang Solutions repository entry is not present in APT sources list' ansible.builtin.apt_repository: repo: 'deb https://packages.erlang-solutions.com/ubuntu {{ ansible_distribution_release }} contrib' + state: 'absent' + +- name: 'Ensure Erlang Solutions repository is present in APT sources list' + ansible.builtin.deb822_repository: + components: + - 'contrib' + enabled: true + name: 'Erlang Solutions' + signed_by: 'https://packages.erlang-solutions.com/{{ ansible_distribution | lower }}/erlang_solutions.asc' + suites: + - '{{ ansible_distribution_release | lower }}' state: 'present' + types: + - 'deb' + uris: 'https://packages.erlang-solutions.com/{{ ansible_distribution | lower }}' - name: 'Ensure Erlang and Elixir packages are installed' ansible.builtin.apt: