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:
parent
106817316d
commit
476f2bf641
144 changed files with 548 additions and 578 deletions
|
|
@ -13,7 +13,7 @@
|
|||
- name: Install sudo package
|
||||
ansible.builtin.package:
|
||||
name: sudo
|
||||
when: ansible_os_family != 'Darwin'
|
||||
when: ansible_facts.os_family != 'Darwin'
|
||||
|
||||
- name: Ensure sudoers directory exists
|
||||
ansible.builtin.file:
|
||||
|
|
@ -211,13 +211,13 @@
|
|||
command:
|
||||
cmd: which visudo
|
||||
register: which_visudo
|
||||
when: ansible_os_family != 'Darwin'
|
||||
when: ansible_facts.os_family != 'Darwin'
|
||||
|
||||
- name: Prevent visudo being executed
|
||||
file:
|
||||
path: "{{ which_visudo.stdout }}"
|
||||
mode: '-x'
|
||||
when: ansible_os_family != 'Darwin'
|
||||
when: ansible_facts.os_family != 'Darwin'
|
||||
|
||||
- name: Attempt command without full path to executable, but enforcing validation with no visudo present
|
||||
community.general.sudoers:
|
||||
|
|
@ -227,7 +227,7 @@
|
|||
commands: systemctl
|
||||
validation: required
|
||||
ignore_errors: true
|
||||
when: ansible_os_family != 'Darwin'
|
||||
when: ansible_facts.os_family != 'Darwin'
|
||||
register: edge_case_3
|
||||
|
||||
- name: Revoke non-existing rule
|
||||
|
|
@ -293,4 +293,4 @@
|
|||
that:
|
||||
- edge_case_3 is failed
|
||||
- "'Failed to find required executable' in edge_case_3.msg"
|
||||
when: ansible_os_family != 'Darwin'
|
||||
when: ansible_facts.os_family != 'Darwin'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue