From 839a6c4952269425ee12b752ee083dc9c2bb0b22 Mon Sep 17 00:00:00 2001 From: "Stefan G. Weichinger" Date: Thu, 11 Jan 2024 11:24:05 +0100 Subject: [PATCH] Revert "Use original fact names instead of injected ones (#147)" This reverts commit b5b470acccd3611345fd45d2a7aa7b0ab57b8e49. --- molecule/default/converge.yml | 4 ++-- tasks/install-bin.yml | 2 +- tasks/main.yml | 6 +++--- templates/etc/ansible/facts.d/rclone.fact.j2 | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/molecule/default/converge.yml b/molecule/default/converge.yml index afd5072..3db08d5 100644 --- a/molecule/default/converge.yml +++ b/molecule/default/converge.yml @@ -9,7 +9,7 @@ ansible.builtin.apt: update_cache: yes cache_valid_time: 600 - when: ansible_facts.os_family == 'Debian' + when: ansible_os_family == 'Debian' - name: Wait for systemd to complete initialization. # noqa command-instead-of-module ansible.builtin.command: systemctl is-system-running @@ -19,7 +19,7 @@ 'degraded' in systemctl_status.stdout retries: 30 delay: 5 - when: ansible_facts.distribution == 'Fedora' + when: ansible_distribution == 'Fedora' changed_when: false - name: Show ansible version diff --git a/tasks/install-bin.yml b/tasks/install-bin.yml index 236130f..f22a3ba 100644 --- a/tasks/install-bin.yml +++ b/tasks/install-bin.yml @@ -5,7 +5,7 @@ ansible.builtin.apt: update_cache: true become: true - when: ansible_facts.distribution == 'Ubuntu' + when: ansible_distribution == 'Ubuntu' - name: Install required packages ansible.builtin.package: diff --git a/tasks/main.yml b/tasks/main.yml index 111f984..0bcaa25 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -3,9 +3,9 @@ - name: Gather OS specific variables ansible.builtin.include_vars: "{{ item }}" with_first_found: - - '{{ ansible_facts.distribution }}-{{ ansible_facts.distribution_major_version }}.yml' - - '{{ ansible_facts.distribution }}.yml' - - '{{ ansible_facts.os_family }}.yml' + - '{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml' + - '{{ ansible_distribution }}.yml' + - '{{ ansible_os_family }}.yml' tags: - vars diff --git a/templates/etc/ansible/facts.d/rclone.fact.j2 b/templates/etc/ansible/facts.d/rclone.fact.j2 index 1992201..5fa313c 100644 --- a/templates/etc/ansible/facts.d/rclone.fact.j2 +++ b/templates/etc/ansible/facts.d/rclone.fact.j2 @@ -1,4 +1,4 @@ -#!{{ ansible_facts.python['executable'] }} +#!{{ ansible_python['executable'] }} # -*- coding: utf-8 -*- # Copyright (C) 2018 Maciej Delmanowski