Describe the issue
Debian has decomissioned the apt-key tooling, hence module ansible.builtin.apt_key is considered deprecated. Replacement is
ansible.builtin.deb822_repository
To Reproduce
Run existing playbook on the sufficiently up-to-date debian distribution.
Expected behaviour
Playbook is able to pass and install Confluent repositories, together with the keys required.
Environment (please complete the following information):
- OS: [cat /etc/debian_version 13.00]
- CP-Ansible Branch: [master fdafcdb Merge branch '8.1.x' into master by rkunwar-28]
- Ansible Version: ansible [core 2.16.14]
Additional context
Sorry I am not that good in pull requests. So the replacement in the roles/common/tasks/debian.yml. It basically means to combine apk_key and apk_repository to ansible.builtin.deb822_repository. This is just a dirty hack I have managed to put together, but maybe it helps in some more clean patch for inspiration.
- name: Add Confluent repo using key from URL.
ansible.builtin.deb822_repository:
name: confluent
types: [deb]
uris: "{{confluent_common_repository_debian_baseurl}}/{{confluent_repo_version}}"
components: [main]
suites: [stable]
signed_by: "{{confluent_common_repository_debian_key_url}}"
state: present
allow_insecure: true
enabled: true
when:
- repository_configuration == 'confluent'
- installation_method == "package"
tags:
- privileged
- name: Add Confluent control repo using key from URL.
ansible.builtin.deb822_repository:
name: confluent-cc
types: [deb]
uris: "{{confluent_control_center_next_gen_repository_debian_baseurl}}"
components: [main]
suites: [stable]
signed_by: "{{confluent_control_center_next_gen_repository_debian_key_url}}"
state: present
allow_insecure: true
enabled: true
when:
- repository_configuration == 'confluent'
- installation_method == "package"
tags:
- privileged
#- name: Add Confluent Apt Key
# apt_key:
# url: "{{item}}"
# state: present
# loop:
# - "{{confluent_common_repository_debian_key_url}}"
# - "{{confluent_control_center_next_gen_repository_debian_key_url}}"
# register: apt_add_key_result
# until: apt_add_key_result is success
# retries: 5
# delay: 90
# when:
# - repository_configuration == 'confluent'
# - installation_method == "package"
# tags:
# - privileged
#- name: Add Confluent Apt Repo
# apt_repository:
# repo: "{{item}}"
# state: present
# loop:
# - "{{confluent_common_repository_debian_repository}}"
# - "{{confluent_control_center_next_gen_repository_debian_repository}}"
# register: apt_add_result
# until: apt_add_result is success
# retries: 5
# delay: 90
# when:
# - repository_configuration == 'confluent'
# - installation_method == "package"
Describe the issue
Debian has decomissioned the apt-key tooling, hence module
ansible.builtin.apt_keyis considered deprecated. Replacement isansible.builtin.deb822_repository
To Reproduce
Run existing playbook on the sufficiently up-to-date debian distribution.
Expected behaviour
Playbook is able to pass and install Confluent repositories, together with the keys required.
Environment (please complete the following information):
Additional context
Sorry I am not that good in pull requests. So the replacement in the
roles/common/tasks/debian.yml. It basically means to combineapk_keyandapk_repositorytoansible.builtin.deb822_repository. This is just a dirty hack I have managed to put together, but maybe it helps in some more clean patch for inspiration.- name: Add Confluent repo using key from URL. ansible.builtin.deb822_repository: name: confluent types: [deb] uris: "{{confluent_common_repository_debian_baseurl}}/{{confluent_repo_version}}" components: [main] suites: [stable] signed_by: "{{confluent_common_repository_debian_key_url}}" state: present allow_insecure: true enabled: true when: - repository_configuration == 'confluent' - installation_method == "package" tags: - privileged - name: Add Confluent control repo using key from URL. ansible.builtin.deb822_repository: name: confluent-cc types: [deb] uris: "{{confluent_control_center_next_gen_repository_debian_baseurl}}" components: [main] suites: [stable] signed_by: "{{confluent_control_center_next_gen_repository_debian_key_url}}" state: present allow_insecure: true enabled: true when: - repository_configuration == 'confluent' - installation_method == "package" tags: - privileged #- name: Add Confluent Apt Key # apt_key: # url: "{{item}}" # state: present # loop: # - "{{confluent_common_repository_debian_key_url}}" # - "{{confluent_control_center_next_gen_repository_debian_key_url}}" # register: apt_add_key_result # until: apt_add_key_result is success # retries: 5 # delay: 90 # when: # - repository_configuration == 'confluent' # - installation_method == "package" # tags: # - privileged #- name: Add Confluent Apt Repo # apt_repository: # repo: "{{item}}" # state: present # loop: # - "{{confluent_common_repository_debian_repository}}" # - "{{confluent_control_center_next_gen_repository_debian_repository}}" # register: apt_add_result # until: apt_add_result is success # retries: 5 # delay: 90 # when: # - repository_configuration == 'confluent' # - installation_method == "package"