-
-
Notifications
You must be signed in to change notification settings - Fork 389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using deb822_repository module instead of apt_key and apt_repository #591
Conversation
I saw the problem with tests: role "add-repository" demand python3-debian package and is executed before role "packages" which install python3-package |
Hello @FactorT I don't quite understand if this change is really necessary, since all tests for Debian 12 pass successfully (every day) - https://github.com/vitabaks/postgresql_cluster/actions/workflows/schedule_pg_debian12.yml
where can I find out more about this? |
@vitabaks |
Thank you for the information. |
It seems that this does not only apply to Debian.
this must be taken into account and the I also think it's worth checking if the ' |
I also remembered that in one of the projects I used keyring option for Example: - name: Add repository apt-key
ansible.builtin.apt_key:
url: "{{ item.key }}"
state: present
keyring: /etc/apt/trusted.gpg.d/{{ item.key | urlsplit('netloc') }}.gpg
loop: "{{ apt_repository_keys }}"
register: apt_key_status
until: apt_key_status is success
delay: 10
retries: 3
when: apt_repository_keys | length > 0 so it's worth considering whether this is the best alternative to the new module (it would require fewer changes). |
Yes, it's interesting idea. But keyring option uses apt-key bin file |
b8c9432
to
e2e04ae
Compare
I don't understand what's wrong with debin12 and debian11 molecule's tests. |
OK, I'll try to figure it out. |
@FactorT I have made some changes to the code, please check it out. But I have not yet found a solution to the error in debian 11, 12 when the second execution of the playbook. |
@vitabaks thank you very much! |
9438ce9
to
6554fd8
Compare
@vitabaks How did you fix the error in debian 11, 12 when the second execution of the playbook? |
Hi @FactorT
I don't know ) maybe the ansible update helped. UPD: That doesn't seem to be the case, ansible version 9.2.0 was used in tests
|
Another theory is that it is possible that fixes have been made to system packages such as python3 that contribute to the correct execution of the code now. |
I've done a few additional test runs and it looks like everything is fine now. I will merge this PR and if there is a problem in the future, we will promptly fix them. |
Since
apt_key
is deprecated in Debian12 and Ubuntu 24.04, thedeb822_repository
module must be used instead.Major changes:
Additional minor changes: