1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2026-03-22 05:09:12 +00:00

Integration tests: replace ansible_xxx with ansible_facts.xxx (#11479)

Replace ansible_xxx with ansible_facts.xxx.
This commit is contained in:
Felix Fontein 2026-02-07 18:18:48 +01:00 committed by GitHub
parent 106817316d
commit 476f2bf641
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
144 changed files with 548 additions and 578 deletions

View file

@ -9,16 +9,16 @@
# SPDX-License-Identifier: GPL-3.0-or-later
- when:
- not (ansible_os_family == 'Alpine' and ansible_distribution_version is version('3.15', '<')) # TODO
- not (ansible_facts.os_family == 'Alpine' and ansible_facts.distribution_version is version('3.15', '<')) # TODO
block:
- name: Include distribution specific variables
include_vars: '{{ lookup(''first_found'', search) }}'
vars:
search:
files:
- '{{ ansible_distribution | lower }}.yml'
- '{{ ansible_os_family | lower }}.yml'
- '{{ ansible_system | lower }}.yml'
- '{{ ansible_facts.distribution | lower }}.yml'
- '{{ ansible_facts.os_family | lower }}.yml'
- '{{ ansible_facts.system | lower }}.yml'
- default.yml
paths:
- vars
@ -38,7 +38,7 @@
- name: Find libfaketime path
shell: '{{ list_pkg_files }} {{ faketime_pkg }} | grep -F libfaketime.so.1'
register: libfaketime_path
- when: ansible_service_mgr == 'systemd'
- when: ansible_facts.service_mgr == 'systemd'
block:
- name: create directory for cron drop-in file
file:
@ -60,7 +60,7 @@
owner: root
group: root
mode: '0644'
- when: ansible_system == 'FreeBSD'
- when: ansible_facts.system == 'FreeBSD'
name: Use faketime with cron service
copy:
content: cron_env='LD_PRELOAD={{ libfaketime_path.stdout_lines[0].strip() }} FAKETIME="+0y x10"'
@ -70,6 +70,6 @@
mode: '0644'
- name: enable cron service
service:
daemon-reload: '{{ (ansible_service_mgr == ''systemd'') | ternary(true, omit) }}'
daemon-reload: '{{ (ansible_facts.service_mgr == ''systemd'') | ternary(true, omit) }}'
name: '{{ cron_service }}'
state: restarted