Skip to content

Commit

Permalink
Use original fact names instead of injected ones (#147)
Browse files Browse the repository at this point in the history
Co-authored-by: Apollo3zehn <[email protected]>
  • Loading branch information
Apollo3zehn and Apollo3zehn authored Jan 10, 2024
1 parent 8af60f0 commit b5b470a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
ansible.builtin.apt:
update_cache: yes
cache_valid_time: 600
when: ansible_os_family == 'Debian'
when: ansible_facts.os_family == 'Debian'

- name: Wait for systemd to complete initialization. # noqa command-instead-of-module
ansible.builtin.command: systemctl is-system-running
Expand All @@ -19,7 +19,7 @@
'degraded' in systemctl_status.stdout
retries: 30
delay: 5
when: ansible_distribution == 'Fedora'
when: ansible_facts.distribution == 'Fedora'
changed_when: false

- name: Show ansible version
Expand Down
2 changes: 1 addition & 1 deletion tasks/install-bin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
ansible.builtin.apt:
update_cache: true
become: true
when: ansible_distribution == 'Ubuntu'
when: ansible_facts.distribution == 'Ubuntu'

- name: Install required packages
ansible.builtin.package:
Expand Down
6 changes: 3 additions & 3 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
- name: Gather OS specific variables
ansible.builtin.include_vars: "{{ item }}"
with_first_found:
- '{{ ansible_distribution }}-{{ ansible_distribution_major_version }}.yml'
- '{{ ansible_distribution }}.yml'
- '{{ ansible_os_family }}.yml'
- '{{ ansible_facts.distribution }}-{{ ansible_facts.distribution_major_version }}.yml'
- '{{ ansible_facts.distribution }}.yml'
- '{{ ansible_facts.os_family }}.yml'
tags:
- vars

Expand Down
2 changes: 1 addition & 1 deletion templates/etc/ansible/facts.d/rclone.fact.j2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!{{ ansible_python['executable'] }}
#!{{ ansible_facts.python['executable'] }}
# -*- coding: utf-8 -*-

# Copyright (C) 2018 Maciej Delmanowski <drybjed@gmail.com>
Expand Down

0 comments on commit b5b470a

Please sign in to comment.