|
|
|
@ -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.
|
|
|
|
|