mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
[PR #11479/476f2bf6 backport][stable-12] Integration tests: replace ansible_xxx with ansible_facts.xxx (#11480)
Integration tests: replace ansible_xxx with ansible_facts.xxx (#11479)
Replace ansible_xxx with ansible_facts.xxx.
(cherry picked from commit 476f2bf641)
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
@@ -29,14 +29,14 @@
|
||||
- name: ensure that checkmode didn't update the timezone in the config file
|
||||
command: egrep '^(TIME)?ZONE="Etc/UTC"' {{ timezone_config_file }}
|
||||
when:
|
||||
- ansible_service_mgr != 'systemd'
|
||||
- ansible_os_family == 'RedHat'
|
||||
- ansible_facts.service_mgr != 'systemd'
|
||||
- ansible_facts.os_family == 'RedHat'
|
||||
|
||||
- name: ensure that checkmode didn't update the timezone in the config file
|
||||
command: egrep '^Etc/UTC' {{ timezone_config_file }}
|
||||
when:
|
||||
- ansible_service_mgr != 'systemd'
|
||||
- ansible_os_family == 'Debian'
|
||||
- ansible_facts.service_mgr != 'systemd'
|
||||
- ansible_facts.os_family == 'Debian'
|
||||
|
||||
- name: set timezone to Australia/Brisbane
|
||||
timezone:
|
||||
@@ -57,14 +57,14 @@
|
||||
- name: ensure that the timezone is updated in the config file
|
||||
command: egrep '^(TIME)?ZONE="Australia/Brisbane"' {{ timezone_config_file }}
|
||||
when:
|
||||
- ansible_service_mgr != 'systemd'
|
||||
- ansible_os_family == 'RedHat'
|
||||
- ansible_facts.service_mgr != 'systemd'
|
||||
- ansible_facts.os_family == 'RedHat'
|
||||
|
||||
- name: ensure that the timezone is updated in the config file
|
||||
command: egrep '^Australia/Brisbane' {{ timezone_config_file }}
|
||||
when:
|
||||
- ansible_service_mgr != 'systemd'
|
||||
- ansible_os_family == 'Debian'
|
||||
- ansible_facts.service_mgr != 'systemd'
|
||||
- ansible_facts.os_family == 'Debian'
|
||||
|
||||
- name: set timezone to Australia/Brisbane again
|
||||
timezone:
|
||||
@@ -272,7 +272,7 @@
|
||||
command: cmp /etc/localtime /usr/share/zoneinfo/Europe/Belgrade
|
||||
changed_when: false
|
||||
when:
|
||||
- ansible_service_mgr != 'systemd'
|
||||
- ansible_facts.service_mgr != 'systemd'
|
||||
- timezone_config_file is defined
|
||||
|
||||
|
||||
@@ -323,7 +323,7 @@
|
||||
|
||||
- name: ensure that checkmode didn't update hwclock the config file
|
||||
command: grep ^UTC=no {{ hwclock_config_file }}
|
||||
when: ansible_service_mgr != 'systemd'
|
||||
when: ansible_facts.service_mgr != 'systemd'
|
||||
|
||||
- name: set hwclock to UTC
|
||||
timezone:
|
||||
@@ -343,7 +343,7 @@
|
||||
|
||||
- name: ensure that hwclock is updated in the config file
|
||||
command: grep ^UTC=yes {{ hwclock_config_file }}
|
||||
when: ansible_service_mgr != 'systemd'
|
||||
when: ansible_facts.service_mgr != 'systemd'
|
||||
|
||||
- name: set hwclock to RTC again
|
||||
timezone:
|
||||
@@ -490,7 +490,7 @@
|
||||
- hwclock_set_local_broken_adjtime.diff.after.hwclock == 'local'
|
||||
- hwclock_set_local_broken_adjtime.diff.before.hwclock == 'UTC'
|
||||
when:
|
||||
- ansible_service_mgr != 'systemd'
|
||||
- ansible_facts.service_mgr != 'systemd'
|
||||
- hwclock_config_file is defined
|
||||
|
||||
####
|
||||
@@ -532,12 +532,12 @@
|
||||
- name: ensure that checkmode didn't update the timezone in the config file
|
||||
command: egrep '^(TIME)?ZONE="Etc/UTC"' {{ timezone_config_file }}
|
||||
when:
|
||||
- ansible_os_family == 'RedHat'
|
||||
- ansible_facts.os_family == 'RedHat'
|
||||
|
||||
- name: ensure that checkmode didn't update the timezone in the config file
|
||||
command: egrep '^Etc/UTC' {{ timezone_config_file }}
|
||||
when:
|
||||
- ansible_os_family == 'Debian'
|
||||
- ansible_facts.os_family == 'Debian'
|
||||
|
||||
- name: ensure that checkmode didn't update hwclock in /etc/adjtime
|
||||
command: grep ^UTC /etc/adjtime
|
||||
@@ -546,7 +546,7 @@
|
||||
|
||||
- name: ensure that checkmode didn't update hwclock the config file
|
||||
command: grep ^UTC=no {{ hwclock_config_file }}
|
||||
when: ansible_service_mgr != 'systemd'
|
||||
when: ansible_facts.service_mgr != 'systemd'
|
||||
|
||||
- name: set timezone to Europe/Belgrade and hwclock to UTC
|
||||
timezone:
|
||||
@@ -571,19 +571,19 @@
|
||||
- name: ensure that the timezone is updated in the config file
|
||||
command: egrep '^(TIME)?ZONE="Europe/Belgrade"' {{ timezone_config_file }}
|
||||
when:
|
||||
- ansible_os_family == 'RedHat'
|
||||
- ansible_facts.os_family == 'RedHat'
|
||||
|
||||
- name: ensure that the timezone is updated in the config file
|
||||
command: egrep 'Europe/Belgrade' {{ timezone_config_file }}
|
||||
when:
|
||||
- ansible_os_family == 'Debian'
|
||||
- ansible_facts.os_family == 'Debian'
|
||||
|
||||
- name: ensure that hwclock is updated in /etc/adjtime
|
||||
command: grep ^UTC /etc/adjtime
|
||||
|
||||
- name: ensure that hwclock is updated in the config file
|
||||
command: grep ^UTC=yes {{ hwclock_config_file }}
|
||||
when: ansible_service_mgr != 'systemd'
|
||||
when: ansible_facts.service_mgr != 'systemd'
|
||||
|
||||
- name: set timezone to Europe/Belgrade and hwclock to UTC again
|
||||
timezone:
|
||||
@@ -608,5 +608,5 @@
|
||||
- not tzclock_set_again_checkmode.changed
|
||||
|
||||
when:
|
||||
- ansible_system == 'Linux'
|
||||
- ansible_facts.system == 'Linux'
|
||||
- hwclock_supported
|
||||
|
||||
Reference in New Issue
Block a user