mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +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:
@@ -12,7 +12,7 @@
|
||||
package:
|
||||
name: lvm2
|
||||
state: present
|
||||
when: ansible_system == 'Linux'
|
||||
when: ansible_facts.system == 'Linux'
|
||||
|
||||
- name: Test lvg module
|
||||
block:
|
||||
|
||||
@@ -11,14 +11,14 @@
|
||||
- name: "get lvm facts"
|
||||
setup:
|
||||
|
||||
- debug: var=ansible_lvm
|
||||
- debug: var=ansible_facts.lvm
|
||||
|
||||
- name: "Assert the testvg span only on first disk"
|
||||
assert:
|
||||
that:
|
||||
- ansible_lvm.pvs[loop_device1].vg == "testvg"
|
||||
- 'loop_device2 not in ansible_lvm.pvs or
|
||||
ansible_lvm.pvs[loop_device2].vg == ""'
|
||||
- ansible_facts.lvm.pvs[loop_device1].vg == "testvg"
|
||||
- 'loop_device2 not in ansible_facts.lvm.pvs or
|
||||
ansible_facts.lvm.pvs[loop_device2].vg == ""'
|
||||
|
||||
- name: "Extend to second disk AND reduce from the first disk"
|
||||
lvg:
|
||||
@@ -28,11 +28,11 @@
|
||||
- name: "get lvm facts"
|
||||
setup:
|
||||
|
||||
- debug: var=ansible_lvm
|
||||
- debug: var=ansible_facts.lvm
|
||||
|
||||
- name: "Assert the testvg span only on first disk"
|
||||
assert:
|
||||
that:
|
||||
- 'loop_device1 not in ansible_lvm.pvs or
|
||||
ansible_lvm.pvs[loop_device1].vg == ""'
|
||||
- ansible_lvm.pvs[loop_device2].vg == "testvg"
|
||||
- 'loop_device1 not in ansible_facts.lvm.pvs or
|
||||
ansible_facts.lvm.pvs[loop_device1].vg == ""'
|
||||
- ansible_facts.lvm.pvs[loop_device2].vg == "testvg"
|
||||
|
||||
@@ -13,14 +13,14 @@
|
||||
- name: "get lvm facts"
|
||||
setup:
|
||||
|
||||
- debug: var=ansible_lvm
|
||||
- debug: var=ansible_facts.lvm
|
||||
|
||||
- name: "Assert the testvg span only on first disk"
|
||||
assert:
|
||||
that:
|
||||
- ansible_lvm.pvs[loop_device1].vg == "testvg"
|
||||
- 'loop_device2 not in ansible_lvm.pvs or
|
||||
ansible_lvm.pvs[loop_device2].vg == ""'
|
||||
- ansible_facts.lvm.pvs[loop_device1].vg == "testvg"
|
||||
- 'loop_device2 not in ansible_facts.lvm.pvs or
|
||||
ansible_facts.lvm.pvs[loop_device2].vg == ""'
|
||||
|
||||
- name: "Extend to second disk AND keep first disk"
|
||||
lvg:
|
||||
@@ -31,10 +31,10 @@
|
||||
- name: "get lvm facts"
|
||||
setup:
|
||||
|
||||
- debug: var=ansible_lvm
|
||||
- debug: var=ansible_facts.lvm
|
||||
|
||||
- name: "Assert the testvg spans on both disks"
|
||||
assert:
|
||||
that:
|
||||
- ansible_lvm.pvs[loop_device1].vg == "testvg"
|
||||
- ansible_lvm.pvs[loop_device2].vg == "testvg"
|
||||
- ansible_facts.lvm.pvs[loop_device1].vg == "testvg"
|
||||
- ansible_facts.lvm.pvs[loop_device2].vg == "testvg"
|
||||
|
||||
Reference in New Issue
Block a user