|
|
|
@ -14,36 +14,37 @@
|
|
|
|
|
# Start with a clean slate.
|
|
|
|
|
- mitogen_shutdown_all:
|
|
|
|
|
|
|
|
|
|
# Connect a few users.
|
|
|
|
|
- shell: "true"
|
|
|
|
|
become: true
|
|
|
|
|
become_user: "mitogen__user{{item}}"
|
|
|
|
|
with_items: [1, 2, 3]
|
|
|
|
|
|
|
|
|
|
# Verify current state.
|
|
|
|
|
- mitogen_action_script:
|
|
|
|
|
script: |
|
|
|
|
|
self._connection._connect()
|
|
|
|
|
result['dump'] = self._connection.get_binding().get_service_context().call_service(
|
|
|
|
|
service_name='ansible_mitogen.services.ContextService',
|
|
|
|
|
method_name='dump'
|
|
|
|
|
)
|
|
|
|
|
register: out
|
|
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
|
that: out.dump|length == (play_hosts|length) * 4 # ssh account + 3 sudo accounts
|
|
|
|
|
|
|
|
|
|
- meta: reset_connection
|
|
|
|
|
|
|
|
|
|
# Verify current state.
|
|
|
|
|
- mitogen_action_script:
|
|
|
|
|
script: |
|
|
|
|
|
self._connection._connect()
|
|
|
|
|
result['dump'] = self._connection.get_binding().get_service_context().call_service(
|
|
|
|
|
service_name='ansible_mitogen.services.ContextService',
|
|
|
|
|
method_name='dump'
|
|
|
|
|
)
|
|
|
|
|
register: out
|
|
|
|
|
|
|
|
|
|
- assert:
|
|
|
|
|
that: out.dump|length == play_hosts|length # just the ssh account
|
|
|
|
|
# TODO: https://github.com/dw/mitogen/issues/695
|
|
|
|
|
# # Connect a few users.
|
|
|
|
|
# - shell: "true"
|
|
|
|
|
# become: true
|
|
|
|
|
# become_user: "mitogen__user{{item}}"
|
|
|
|
|
# with_items: [1, 2, 3]
|
|
|
|
|
|
|
|
|
|
# # Verify current state.
|
|
|
|
|
# - mitogen_action_script:
|
|
|
|
|
# script: |
|
|
|
|
|
# self._connection._connect()
|
|
|
|
|
# result['dump'] = self._connection.get_binding().get_service_context().call_service(
|
|
|
|
|
# service_name='ansible_mitogen.services.ContextService',
|
|
|
|
|
# method_name='dump'
|
|
|
|
|
# )
|
|
|
|
|
# register: out
|
|
|
|
|
|
|
|
|
|
# - assert:
|
|
|
|
|
# that: out.dump|length == (play_hosts|length) * 4 # ssh account + 3 sudo accounts
|
|
|
|
|
|
|
|
|
|
# - meta: reset_connection
|
|
|
|
|
|
|
|
|
|
# # Verify current state.
|
|
|
|
|
# - mitogen_action_script:
|
|
|
|
|
# script: |
|
|
|
|
|
# self._connection._connect()
|
|
|
|
|
# result['dump'] = self._connection.get_binding().get_service_context().call_service(
|
|
|
|
|
# service_name='ansible_mitogen.services.ContextService',
|
|
|
|
|
# method_name='dump'
|
|
|
|
|
# )
|
|
|
|
|
# register: out
|
|
|
|
|
|
|
|
|
|
# - assert:
|
|
|
|
|
# that: out.dump|length == play_hosts|length # just the ssh account
|
|
|
|
|