From 23f3899b0260da40663feb8bf80e522b50a41a61 Mon Sep 17 00:00:00 2001 From: Reto Gantenbein Date: Sat, 15 Aug 2026 12:17:46 +0200 Subject: [PATCH 1/3] molecule: Remove redundant templating delimiters in assert conditional Ansible deprecates wrapping conditionals in {{ }}; this will be removed in ansible-core 2.23. --- molecule/podman/verify.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/molecule/podman/verify.yml b/molecule/podman/verify.yml index 51d415f..1d4a008 100644 --- a/molecule/podman/verify.yml +++ b/molecule/podman/verify.yml @@ -18,7 +18,7 @@ - name: GPG public key and repository file must exist ansible.builtin.assert: quiet: true - that: '{{ item.stat.exists }}' + that: item.stat.exists loop: '{{ verify_repo_files.results }}' loop_control: label: '{{ item.item }}' From ffff83986bc08c8b65aadd4dfe04a0522b5e95ab Mon Sep 17 00:00:00 2001 From: Reto Gantenbein Date: Sat, 15 Aug 2026 12:18:05 +0200 Subject: [PATCH 2/3] molecule: Use ansible_facts dictionary instead of ansible_ prefixed var Directly referencing top-level 'ansible_distribution' facts is deprecated in favor of 'ansible_facts["distribution"]' and will be removed in ansible-core 2.24. --- molecule/podman/verify.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/molecule/podman/verify.yml b/molecule/podman/verify.yml index 1d4a008..8c6c926 100644 --- a/molecule/podman/verify.yml +++ b/molecule/podman/verify.yml @@ -11,7 +11,7 @@ path: '{{ item }}' loop: - '/var/www/html/ganto/jo/pubkey.gpg' - - '/var/www/html/ganto/jo/ganto-jo-{{ "fedora" if ansible_distribution == "Fedora" + - '/var/www/html/ganto/jo/ganto-jo-{{ "fedora" if ansible_facts["distribution"] == "Fedora" else "epel" }}.repo' register: verify_repo_files @@ -25,7 +25,7 @@ - name: Download repository file to local yum repos path ansible.builtin.get_url: - url: 'http://localhost/ganto/jo/ganto-jo-{{ "fedora" if ansible_distribution == "Fedora" + url: 'http://localhost/ganto/jo/ganto-jo-{{ "fedora" if ansible_facts["distribution"] == "Fedora" else "epel" }}.repo' dest: '/etc/yum.repos.d/_copr-mirror_ganto-jo.repo' mode: '0644' From f434e895198911d1f66f74b50bb2803513ae6f69 Mon Sep 17 00:00:00 2001 From: Reto Gantenbein Date: Sat, 15 Aug 2026 12:18:13 +0200 Subject: [PATCH 3/3] changelog: Add entry for molecule deprecation warning fixes --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index f7181bf..d71df0b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,10 @@ The current role maintainer is [ganto](https://github.com/ganto). ## [master](https://github.com/ganto/ansible-copr_reposync/compare/1.2.0...master) - _unreleased_ +### Fixed + +- Resolve ansible-core deprecation warnings in molecule verify playbook + ## [1.2.0](https://github.com/ganto/ansible-copr_reposync/compare/1.1.0...1.2.0) - 2025.02.05 ### Changed