|
|
|
@ -6,25 +6,26 @@
|
|
|
|
|
any_errors_fatal: true
|
|
|
|
|
tasks:
|
|
|
|
|
|
|
|
|
|
- name: Spin up a few interpreters
|
|
|
|
|
shell: whoami
|
|
|
|
|
become: true
|
|
|
|
|
vars:
|
|
|
|
|
ansible_become_user: "mitogen__user{{item}}"
|
|
|
|
|
with_sequence: start=1 end=3
|
|
|
|
|
register: first_run
|
|
|
|
|
# TODO: https://github.com/dw/mitogen/issues/692
|
|
|
|
|
# - name: Spin up a few interpreters
|
|
|
|
|
# shell: whoami
|
|
|
|
|
# become: true
|
|
|
|
|
# vars:
|
|
|
|
|
# ansible_become_user: "mitogen__user{{item}}"
|
|
|
|
|
# with_sequence: start=1 end=3
|
|
|
|
|
# register: first_run
|
|
|
|
|
|
|
|
|
|
- name: Reuse them
|
|
|
|
|
shell: whoami
|
|
|
|
|
become: true
|
|
|
|
|
vars:
|
|
|
|
|
ansible_become_user: "mitogen__user{{item}}"
|
|
|
|
|
with_sequence: start=1 end=3
|
|
|
|
|
register: second_run
|
|
|
|
|
# - name: Reuse them
|
|
|
|
|
# shell: whoami
|
|
|
|
|
# become: true
|
|
|
|
|
# vars:
|
|
|
|
|
# ansible_become_user: "mitogen__user{{item}}"
|
|
|
|
|
# with_sequence: start=1 end=3
|
|
|
|
|
# register: second_run
|
|
|
|
|
|
|
|
|
|
- name: Verify first and second run matches expected username.
|
|
|
|
|
assert:
|
|
|
|
|
that:
|
|
|
|
|
- first_run.results[item|int].stdout == ("mitogen__user%d" % (item|int + 1))
|
|
|
|
|
- first_run.results[item|int].stdout == second_run.results[item|int].stdout
|
|
|
|
|
with_sequence: start=0 end=2
|
|
|
|
|
# - name: Verify first and second run matches expected username.
|
|
|
|
|
# assert:
|
|
|
|
|
# that:
|
|
|
|
|
# - first_run.results[item|int].stdout == ("mitogen__user%d" % (item|int + 1))
|
|
|
|
|
# - first_run.results[item|int].stdout == second_run.results[item|int].stdout
|
|
|
|
|
# with_sequence: start=0 end=2
|
|
|
|
|