diff --git a/tests/ansible/integration/become/sudo_nonexistent.yml b/tests/ansible/integration/become/sudo_nonexistent.yml index 3f6a2dc6..86b3b101 100644 --- a/tests/ansible/integration/become/sudo_nonexistent.yml +++ b/tests/ansible/integration/become/sudo_nonexistent.yml @@ -9,6 +9,11 @@ become_user: slartibartfast ignore_errors: true register: out + when: + # https://github.com/ansible/ansible/pull/70785 + - ansible_facts.distribution not in ["MacOSX"] + or ansible_version.full is version("2.11", ">=", strict=True) + or is_mitogen - name: Verify raw module output. assert: @@ -20,3 +25,8 @@ ('sudo: unknown user: slartibartfast' in out.module_stderr | default(out.msg)) or (ansible_facts.os_family == 'RedHat' and ansible_facts.distribution_version == '6.10') fail_msg: out={{out}} + when: + # https://github.com/ansible/ansible/pull/70785 + - ansible_facts.distribution not in ["MacOSX"] + or ansible_version.full is version("2.11", ">=", strict=True) + or is_mitogen diff --git a/tests/ansible/integration/become/sudo_password.yml b/tests/ansible/integration/become/sudo_password.yml index 6653c3e9..d2aa1d48 100644 --- a/tests/ansible/integration/become/sudo_password.yml +++ b/tests/ansible/integration/become/sudo_password.yml @@ -11,6 +11,11 @@ become_user: mitogen__pw_required register: out ignore_errors: true + when: + # https://github.com/ansible/ansible/pull/70785 + - ansible_facts.distribution not in ["MacOSX"] + or ansible_version.full is version("2.11", ">=", strict=True) + or is_mitogen - assert: that: | @@ -20,6 +25,11 @@ ('password is required' in out.module_stderr) ) fail_msg: out={{out}} + when: + # https://github.com/ansible/ansible/pull/70785 + - ansible_facts.distribution not in ["MacOSX"] + or ansible_version.full is version("2.11", ">=", strict=True) + or is_mitogen - name: Ensure password sudo incorrect. shell: whoami @@ -29,6 +39,11 @@ vars: ansible_become_pass: nopes ignore_errors: true + when: + # https://github.com/ansible/ansible/pull/70785 + - ansible_facts.distribution not in ["MacOSX"] + or ansible_version.full is version("2.11", ">=", strict=True) + or is_mitogen - assert: that: | @@ -37,6 +52,11 @@ ('sudo password is incorrect' in out.msg) ) fail_msg: out={{out}} + when: + # https://github.com/ansible/ansible/pull/70785 + - ansible_facts.distribution not in ["MacOSX"] + or ansible_version.full is version("2.11", ">=", strict=True) + or is_mitogen # TODO: https://github.com/dw/mitogen/issues/692 # - name: Ensure password sudo succeeds. diff --git a/tests/ansible/setup/report.yml b/tests/ansible/setup/report.yml index 7ccd049a..9077158f 100644 --- a/tests/ansible/setup/report.yml +++ b/tests/ansible/setup/report.yml @@ -1,7 +1,18 @@ - name: Report runtime settings - hosts: localhost - gather_facts: false + hosts: localhost:test-targets + gather_facts: true tasks: + - debug: {var: ansible_facts.distribution} + - debug: {var: ansible_facts.distribution_major_version} + - debug: {var: ansible_facts.distribution_release} + - debug: {var: ansible_facts.distribution_version} + - debug: {var: ansible_facts.kernel} + - debug: {var: ansible_facts.kernel_version} + - debug: {var: ansible_facts.os_family} + - debug: {var: ansible_facts.osrevision} + - debug: {var: ansible_facts.osversion} + - debug: {var: ansible_facts.python} + - debug: {var: ansible_facts.system} - debug: {var: ansible_forks} - debug: {var: ansible_run_tags} - debug: {var: ansible_skip_tags}