Reference Ansible facts via ansible_facts variable, not globally

This should bring better compatibility with future Ansible versions,
one of which will some day drop support for accessing facts via the global namespace.

Ref: https://github.com/geerlingguy/ansible-role-docker/pull/513
This commit is contained in:
Slavi Pantaleev
2025-08-26 15:22:34 +03:00
parent 831a288ffc
commit 2252697119
4 changed files with 7 additions and 7 deletions

View File

@@ -10,7 +10,7 @@
block:
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/validate_config.yml"
- when: ansible_os_family == 'Debian' and matrix_playbook_docker_installation_enabled | bool and matrix_playbook_migration_debian_signedby_migration_enabled | bool
- when: ansible_facts.os_family == 'Debian' and matrix_playbook_docker_installation_enabled | bool and matrix_playbook_migration_debian_signedby_migration_enabled | bool
tags:
- setup-all
- install-all
@@ -19,7 +19,7 @@
block:
- ansible.builtin.include_tasks: "{{ role_path }}/tasks/debian_docker_signedby_migration.yml"
- when: ansible_os_family == 'Debian' and matrix_playbook_docker_installation_enabled | bool and matrix_playbook_migration_docker_trusted_gpg_d_migration_enabled | bool
- when: ansible_facts.os_family == 'Debian' and matrix_playbook_docker_installation_enabled | bool and matrix_playbook_migration_docker_trusted_gpg_d_migration_enabled | bool
tags:
- setup-all
- install-all