mirror of
https://github.com/ansible-collections/ansible.posix.git
synced 2026-01-11 23:25:28 +01:00
Merge pull request #226 from mandar242/fix-integration-test-sysctl
Fix: sysctl integration test - virtualization type SUMMARY sysctl integration tests inside docker are being skipped as the check ansible_facts.virtualization_type == 'docker' fails. On Debugging, ansible_facts.virtualization_type is being returned as "container". ISSUE TYPE Bugfix Pull Request COMPONENT NAME sysctl ADDITIONAL INFORMATION Ansible Version ansible [core 2.11.2] Docker Version Docker version 20.10.7, build f0df350 OS Fedora 34 Actual Results PLAY RECAP ********************************************************************* testhost : ok=1 changed=0 unreachable=0 failed=0 skipped=44 rescued=0 ignored=0 Likely this code is related: https://github.com/ansible/ansible/blob/devel/lib/ansible/module_utils/facts/virtual/linux.py#L113 Reviewed-by: Mike Graves <mgraves@redhat.com> Reviewed-by: None <None>
This commit is contained in:
commit
ce3d0fdfa4
2 changed files with 3 additions and 1 deletions
2
changelogs/fragments/226_sysctl_fix_integration_test.yml
Normal file
2
changelogs/fragments/226_sysctl_fix_integration_test.yml
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
bugfixes:
|
||||||
|
- sysctl - modifying conditional check for docker to fix tests being skipped (https://github.com/ansible-collections/ansible.posix/pull/226).
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
- name: Test inside Docker
|
- name: Test inside Docker
|
||||||
when:
|
when:
|
||||||
- ansible_facts.virtualization_type == 'docker'
|
- ansible_facts.virtualization_type == 'docker' or ansible_facts.virtualization_type == 'container'
|
||||||
block:
|
block:
|
||||||
- set_fact:
|
- set_fact:
|
||||||
output_dir_test: "{{ output_dir }}/test_sysctl"
|
output_dir_test: "{{ output_dir }}/test_sysctl"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue