|
|
@ -12,12 +12,14 @@
|
|
|
|
become: true
|
|
|
|
become: true
|
|
|
|
become_user: joe
|
|
|
|
become_user: joe
|
|
|
|
register: out
|
|
|
|
register: out
|
|
|
|
|
|
|
|
when: is_mitogen
|
|
|
|
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
- out.result[0].method == "ssh"
|
|
|
|
- out.result[0].method == "ssh"
|
|
|
|
- out.result[0].kwargs.username == "joe"
|
|
|
|
- out.result[0].kwargs.username == "joe"
|
|
|
|
- out.result|length == 1 # no sudo
|
|
|
|
- out.result|length == 1 # no sudo
|
|
|
|
|
|
|
|
when: is_mitogen
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Now try with a different account.
|
|
|
|
# Now try with a different account.
|
|
|
@ -25,6 +27,7 @@
|
|
|
|
become: true
|
|
|
|
become: true
|
|
|
|
become_user: james
|
|
|
|
become_user: james
|
|
|
|
register: out
|
|
|
|
register: out
|
|
|
|
|
|
|
|
when: is_mitogen
|
|
|
|
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
that:
|
|
|
@ -33,3 +36,4 @@
|
|
|
|
- out.result[1].method == "sudo"
|
|
|
|
- out.result[1].method == "sudo"
|
|
|
|
- out.result[1].kwargs.username == "james"
|
|
|
|
- out.result[1].kwargs.username == "james"
|
|
|
|
- out.result|length == 2 # no sudo
|
|
|
|
- out.result|length == 2 # no sudo
|
|
|
|
|
|
|
|
when: is_mitogen
|
|
|
|