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:
ansible-zuul[bot] 2021-08-05 05:38:35 +00:00 committed by GitHub
commit ce3d0fdfa4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View 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).

View file

@ -22,7 +22,7 @@
- name: Test inside Docker
when:
- ansible_facts.virtualization_type == 'docker'
- ansible_facts.virtualization_type == 'docker' or ansible_facts.virtualization_type == 'container'
block:
- set_fact:
output_dir_test: "{{ output_dir }}/test_sysctl"