-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Description
| - name: Ensure Elastic Stack key is removed (Debian legacy format) |
Since Debian 13, apt-key is not available anymore, it leads to the following error:
TASK [netways.elasticstack.repos : Ensure Elastic Stack key is removed (Debian legacy format)] **************************************************************************************************************************************************************************************************************************************************************************************************************************************
fatal: [x.x.x.x]: FAILED! => {"changed": false, "msg": "Failed to find required executable \"apt-key\" in paths: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"}
According to https://docs.ansible.com/ansible/latest/collections/ansible/builtin/apt_key_module.html
The apt-key command used by this module has been deprecated. See the [Debian wiki](https://wiki.debian.org/DebianRepository/UseThirdParty) for details. This module is kept for backwards compatibility for systems that still use apt-key as the main way to manage apt repository keys.
This should fix the issue:
- name: Ensure Elastic Stack key is removed (Debian legacy format)
ansible.builtin.apt_key:
url: "{{ elasticstack_repo_key }}"
state: absent
when: ansible_distribution_major_version <= "12"
Metadata
Metadata
Assignees
Labels
No labels