diff --git a/tests/ansible/integration/glibc_caches/resolv_conf.yml b/tests/ansible/integration/glibc_caches/resolv_conf.yml index 643b83ec..da78c308 100644 --- a/tests/ansible/integration/glibc_caches/resolv_conf.yml +++ b/tests/ansible/integration/glibc_caches/resolv_conf.yml @@ -12,26 +12,38 @@ - mitogen_test_gethostbyname: name: www.google.com register: out - when: ansible_virtualization_type == "docker" + when: | + ansible_virtualization_type == "docker" and + ansible_python_version > "2.5" - shell: cp /etc/resolv.conf /tmp/resolv.conf - when: ansible_virtualization_type == "docker" + when: | + ansible_virtualization_type == "docker" and + ansible_python_version > "2.5" - shell: echo > /etc/resolv.conf - when: ansible_virtualization_type == "docker" + when: | + ansible_virtualization_type == "docker" and + ansible_python_version > "2.5" - mitogen_test_gethostbyname: name: www.google.com register: out ignore_errors: true - when: ansible_virtualization_type == "docker" + when: | + ansible_virtualization_type == "docker" and + ansible_python_version > "2.5" - shell: cat /tmp/resolv.conf > /etc/resolv.conf - when: ansible_virtualization_type == "docker" + when: | + ansible_virtualization_type == "docker" and + ansible_python_version > "2.5" - assert: that: - out.failed - '"Name or service not known" in out.msg or "Temporary failure in name resolution" in out.msg' - when: ansible_virtualization_type == "docker" + when: | + ansible_virtualization_type == "docker" and + ansible_python_version > "2.5"