diff --git a/ansible-scylla-node/tasks/Debian.yml b/ansible-scylla-node/tasks/Debian.yml index 40d5057c..b81fc762 100644 --- a/ansible-scylla-node/tasks/Debian.yml +++ b/ansible-scylla-node/tasks/Debian.yml @@ -8,6 +8,14 @@ update_cache: yes when: install_type == 'online' and scylla_repo_keyserver is defined and scylla_repo_keys is defined and (scylla_repo_keys|length > 0) + - name: Remove an apt key by id from a keyserver + apt_key: + keyserver: "{{ scylla_repo_keyserver }}" + id: "{{ item }}" + state: absent + with_items: "{{ scylla_repo_keys }}" + when: install_type == 'online' and scylla_repo_keyserver is defined and scylla_repo_keys is defined and (scylla_repo_keys|length > 0) + - name: Add an apt key by id from a keyserver apt_key: keyserver: "{{ scylla_repo_keyserver }}" @@ -23,6 +31,15 @@ mode: '1755' owner: "root" + - name: Remove an apt key by id from a keyserver to {{ scylla_repo_keyringfile }} + ansible.builtin.apt_key: + id: "{{ item }}" + keyserver: "{{ scylla_repo_keyserver }}" + keyring: "{{ scylla_repo_keyringfile }}" + state: absent + with_items: "{{ scylla_repo_keys }}" + when: install_type == 'online' and scylla_repo_keyserver is defined and scylla_repo_keys is defined and (scylla_repo_keys|length > 0) + - name: Add an apt key by id from a keyserver to {{ scylla_repo_keyringfile }} ansible.builtin.apt_key: id: "{{ item }}"