diff --git a/roles/cephadm/tasks/pkg_debian.yml b/roles/cephadm/tasks/pkg_debian.yml index 636e782..db91a7b 100644 --- a/roles/cephadm/tasks/pkg_debian.yml +++ b/roles/cephadm/tasks/pkg_debian.yml @@ -1,10 +1,13 @@ --- # Remove any old Ceph keys added to the main keyring. -- name: Clean up old key +- name: "Clean up old key for older releases (including the release specified) than debian 12 and ubuntu 24.04" apt_key: id: E84AC2C0460F3994 state: absent become: true + when: > + (ansible_facts.distribution == 'Debian' and ansible_facts.distribution_major_version|int <= 12) or + (ansible_facts.distribution == 'Ubuntu' and ansible_facts.distribution_major_version|int <= 24) - name: Ensure keys directory exists file: