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