tests: Replace uses of ``include:``, unify skipping of mitogen only tests

The tag mitogen_only is only informational for now. It may be possible to use
it with ANSIBLE_SKIP_TAGS in the future.
pull/1042/head
Alex Willmer 8 months ago
parent fa1d21747f
commit 45c42d386a

@ -22,6 +22,7 @@ Unreleased
---------- ----------
* :gh:issue:`1021` Support for Ansible 8 (ansible-core 2.15) * :gh:issue:`1021` Support for Ansible 8 (ansible-core 2.15)
* tests: Replace uses of ``include:`` & ``import:``, unsupported in Ansible 9
v0.3.6 (2024-04-04) v0.3.6 (2024-04-04)

@ -10,8 +10,7 @@
- name: integration/action/make_tmp_path.yml - name: integration/action/make_tmp_path.yml
hosts: test-targets hosts: test-targets
tasks: tasks:
- meta: end_play - include_tasks: ../_mitogen_only.yml
when: not is_mitogen
# #
# non-root # non-root
@ -161,3 +160,4 @@
fail_msg: out={{out}} fail_msg: out={{out}}
tags: tags:
- make_tmp_path - make_tmp_path
- mitogen_only

@ -3,6 +3,7 @@
- name: integration/async/runner_timeout_then_polling.yml - name: integration/async/runner_timeout_then_polling.yml
hosts: test-targets hosts: test-targets
tasks: tasks:
- include_tasks: ../_mitogen_only.yml
# Verify async-with-timeout-then-poll behaviour. # Verify async-with-timeout-then-poll behaviour.
# This is semi-broken in upstream Ansible, it does not bother to update the # This is semi-broken in upstream Ansible, it does not bother to update the
@ -13,7 +14,6 @@
async: 1 async: 1
poll: 0 poll: 0
register: job register: job
when: is_mitogen
- name: busy-poll up to 500 times - name: busy-poll up to 500 times
async_status: async_status:
@ -22,7 +22,6 @@
until: result.finished until: result.finished
retries: 500 retries: 500
delay: 0 delay: 0
when: is_mitogen
ignore_errors: true ignore_errors: true
- assert: - assert:
@ -31,6 +30,6 @@
- result.finished == 1 - result.finished == 1
- result.msg == "Job reached maximum time limit of 1 seconds." - result.msg == "Job reached maximum time limit of 1 seconds."
fail_msg: result={{result}} fail_msg: result={{result}}
when: is_mitogen
tags: tags:
- mitogen_only
- runner_timeout_then_polling - runner_timeout_then_polling

@ -3,6 +3,7 @@
- name: integration/become/sudo_requiretty.yml - name: integration/become/sudo_requiretty.yml
hosts: test-targets hosts: test-targets
tasks: tasks:
# - include_tasks: ../_mitogen_only.yml
# TODO: https://github.com/dw/mitogen/issues/692 # TODO: https://github.com/dw/mitogen/issues/692
# - name: Verify we can login to a non-passworded requiretty account # - name: Verify we can login to a non-passworded requiretty account
@ -10,12 +11,10 @@
# become: true # become: true
# become_user: mitogen__require_tty # become_user: mitogen__require_tty
# register: out # register: out
# when: is_mitogen
# - assert: # - assert:
# that: # that:
# - out.stdout == 'mitogen__require_tty' # - out.stdout == 'mitogen__require_tty'
# when: is_mitogen
# --------------- # ---------------
@ -28,12 +27,11 @@
# vars: # vars:
# ansible_become_pass: require_tty_pw_required_password # ansible_become_pass: require_tty_pw_required_password
# register: out # register: out
# when: is_mitogen
# - assert: # - assert:
# that: # that:
# - out.stdout == 'mitogen__require_tty_pw_required' # - out.stdout == 'mitogen__require_tty_pw_required'
# when: is_mitogen
tags: tags:
- mitogen_only
- sudo - sudo
- sudo_requiretty - sudo_requiretty

@ -5,13 +5,13 @@
hosts: bsu-joe hosts: bsu-joe
gather_facts: no gather_facts: no
tasks: tasks:
- include_tasks: ../_mitogen_only.yml
# bsu-joe's login user is joe, so become should be ignored. # bsu-joe's login user is joe, so become should be ignored.
- mitogen_get_stack: - mitogen_get_stack:
become: true become: true
become_user: joe become_user: joe
register: out register: out
when: is_mitogen
- assert: - assert:
that: that:
@ -19,7 +19,6 @@
- out.result[0].kwargs.username == "joe" - out.result[0].kwargs.username == "joe"
- out.result|length == 1 # no sudo - out.result|length == 1 # no sudo
fail_msg: out={{out}} fail_msg: out={{out}}
when: is_mitogen
# Now try with a different account. # Now try with a different account.
@ -27,7 +26,6 @@
become: true become: true
become_user: james become_user: james
register: out register: out
when: is_mitogen
- assert: - assert:
that: that:
@ -37,6 +35,6 @@
- out.result[1].kwargs.username == "james" - out.result[1].kwargs.username == "james"
- out.result|length == 2 # no sudo - out.result|length == 2 # no sudo
fail_msg: out={{out}} fail_msg: out={{out}}
when: is_mitogen
tags: tags:
- become_same_user - become_same_user
- mitogen_only

@ -6,8 +6,7 @@
gather_facts: no gather_facts: no
any_errors_fatal: false any_errors_fatal: false
tasks: tasks:
- meta: end_play - include_tasks: ../_mitogen_only.yml
when: not is_mitogen
- name: Run _disconnect_during_module.yml - name: Run _disconnect_during_module.yml
delegate_to: localhost delegate_to: localhost
@ -32,3 +31,4 @@
tags: tags:
- disconnect - disconnect
- disconnect_during_module - disconnect_during_module
- mitogen_only

@ -13,8 +13,7 @@
hosts: test-targets hosts: test-targets
gather_facts: no gather_facts: no
tasks: tasks:
- meta: end_play - include_tasks: ../_mitogen_only.yml
when: not is_mitogen
- mitogen_action_script: - mitogen_action_script:
script: | script: |
@ -47,3 +46,4 @@
tags: tags:
- disconnect - disconnect
- disconnect_resets_connection - disconnect_resets_connection
- mitogen_only

@ -3,18 +3,18 @@
- name: integration/connection/home_dir.yml - name: integration/connection/home_dir.yml
hosts: test-targets hosts: test-targets
tasks: tasks:
- include_tasks: ../_mitogen_only.yml
- name: "Find out root's homedir." - name: "Find out root's homedir."
# Runs first because it blats regular Ansible facts with junk, so # Runs first because it blats regular Ansible facts with junk, so
# non-become run fixes that up. # non-become run fixes that up.
setup: setup:
become: true become: true
register: root_facts register: root_facts
when: is_mitogen
- name: "Find regular homedir" - name: "Find regular homedir"
setup: setup:
register: user_facts register: user_facts
when: is_mitogen
- name: "Verify Connection.homedir correct when become:false" - name: "Verify Connection.homedir correct when become:false"
mitogen_action_script: mitogen_action_script:
@ -24,7 +24,6 @@
"connection homedir": self._connection.homedir, "connection homedir": self._connection.homedir,
"homedir from facts": "{{user_facts.ansible_facts.ansible_user_dir}}" "homedir from facts": "{{user_facts.ansible_facts.ansible_user_dir}}"
} }
when: is_mitogen
- name: "Verify Connection.homedir correct when become:true" - name: "Verify Connection.homedir correct when become:true"
become: true become: true
@ -35,6 +34,6 @@
"connection homedir": self._connection.homedir, "connection homedir": self._connection.homedir,
"homedir from facts": "{{root_facts.ansible_facts.ansible_user_dir}}" "homedir from facts": "{{root_facts.ansible_facts.ansible_user_dir}}"
} }
when: is_mitogen
tags: tags:
- home_dir - home_dir
- mitogen_only

@ -8,7 +8,7 @@
file_name: large-file file_name: large-file
file_size: 512 file_size: 512
tasks: tasks:
- include: _put_file.yml - include_tasks: _put_file.yml
tags: tags:
- put_file - put_file
- put_large_file - put_large_file

@ -8,7 +8,7 @@
file_name: small-file file_name: small-file
file_size: 123 file_size: 123
tasks: tasks:
- include: _put_file.yml - include_tasks: _put_file.yml
tags: tags:
- put_file - put_file
- put_small_file - put_small_file

@ -6,8 +6,7 @@
- name: integration/connection/reset.yml - name: integration/connection/reset.yml
hosts: test-targets hosts: test-targets
tasks: tasks:
- meta: end_play - include_tasks: ../_mitogen_only.yml
when: not is_mitogen
- debug: msg="reset.yml skipped on Ansible<2.5.6" - debug: msg="reset.yml skipped on Ansible<2.5.6"
when: when:
@ -47,4 +46,5 @@
- out_become.ppid != out_become2.ppid - out_become.ppid != out_become2.ppid
fail_msg: out={{out}} out2={{out2}} out_become={{out_become}} out_become2={{out_become2}} fail_msg: out={{out}} out2={{out2}} out_become={{out_become}} out_become2={{out_become2}}
tags: tags:
- mitogen_only
- reset - reset

@ -15,8 +15,7 @@
hosts: test-targets hosts: test-targets
gather_facts: no gather_facts: no
tasks: tasks:
- meta: end_play - include_tasks: ../_mitogen_only.yml
when: not is_mitogen
- meta: end_play - meta: end_play
when: when:
@ -88,3 +87,4 @@
] ]
tags: tags:
- delegate_to_template - delegate_to_template
- mitogen_only

@ -3,8 +3,7 @@
- name: integration/connection_delegation/local_action.yml - name: integration/connection_delegation/local_action.yml
hosts: cd-newuser-normal-normal hosts: cd-newuser-normal-normal
tasks: tasks:
- meta: end_play - include_tasks: ../_mitogen_only.yml
when: not is_mitogen
- local_action: mitogen_get_stack - local_action: mitogen_get_stack
become: true become: true
@ -35,3 +34,4 @@
] ]
tags: tags:
- local_action - local_action
- mitogen_only

@ -4,8 +4,7 @@
hosts: dtc-container-1 hosts: dtc-container-1
gather_facts: false gather_facts: false
tasks: tasks:
- meta: end_play - include_tasks: ../_mitogen_only.yml
when: not is_mitogen
- mitogen_get_stack: - mitogen_get_stack:
register: out register: out
@ -28,5 +27,6 @@
}, },
] ]
tags: tags:
- mitogen_only
- osa - osa
- osa_container_standalone - osa_container_standalone

@ -6,8 +6,7 @@
target: osa-container-1 target: osa-container-1
gather_facts: false gather_facts: false
tasks: tasks:
- meta: end_play - include_tasks: ../_mitogen_only.yml
when: not is_mitogen
- mitogen_get_stack: - mitogen_get_stack:
delegate_to: "{{target}}" delegate_to: "{{target}}"
@ -31,5 +30,6 @@
}, },
] ]
tags: tags:
- mitogen_only
- osa - osa
- osa_delegate_to_self - osa_delegate_to_self

@ -19,9 +19,7 @@
- name: integration/connection_delegation/stack_construction.yml - name: integration/connection_delegation/stack_construction.yml
hosts: cd-normal hosts: cd-normal
tasks: tasks:
- meta: end_play - include_tasks: ../_mitogen_only.yml
when: not is_mitogen
# used later for local_action test. # used later for local_action test.
- local_action: custom_python_detect_environment - local_action: custom_python_detect_environment
register: local_env register: local_env
@ -31,9 +29,7 @@
- hosts: cd-normal - hosts: cd-normal
tasks: tasks:
- meta: end_play - include_tasks: ../_mitogen_only.yml
when: not is_mitogen
- mitogen_get_stack: - mitogen_get_stack:
register: out register: out
- assert_equal: - assert_equal:
@ -52,14 +48,13 @@
} }
] ]
tags: tags:
- mitogen_only
- stack_construction - stack_construction
- hosts: cd-normal - hosts: cd-normal
tasks: tasks:
- meta: end_play - include_tasks: ../_mitogen_only.yml
when: not is_mitogen
- mitogen_get_stack: - mitogen_get_stack:
delegate_to: cd-alias delegate_to: cd-alias
register: out register: out
@ -96,14 +91,13 @@
}, },
] ]
tags: tags:
- mitogen_only
- stack_construction - stack_construction
- hosts: cd-alias - hosts: cd-alias
tasks: tasks:
- meta: end_play - include_tasks: ../_mitogen_only.yml
when: not is_mitogen
- mitogen_get_stack: - mitogen_get_stack:
register: out register: out
- assert_equal: - assert_equal:
@ -139,14 +133,13 @@
}, },
] ]
tags: tags:
- mitogen_only
- stack_construction - stack_construction
- hosts: cd-normal-normal - hosts: cd-normal-normal
tasks: tasks:
- meta: end_play - include_tasks: ../_mitogen_only.yml
when: not is_mitogen
- mitogen_get_stack: - mitogen_get_stack:
register: out register: out
- assert_equal: - assert_equal:
@ -193,14 +186,13 @@
}, },
] ]
tags: tags:
- mitogen_only
- stack_construction - stack_construction
- hosts: cd-normal-alias - hosts: cd-normal-alias
tasks: tasks:
- meta: end_play - include_tasks: ../_mitogen_only.yml
when: not is_mitogen
- mitogen_get_stack: - mitogen_get_stack:
register: out register: out
- assert_equal: - assert_equal:
@ -269,9 +261,7 @@
- hosts: cd-newuser-normal-normal - hosts: cd-newuser-normal-normal
tasks: tasks:
- meta: end_play - include_tasks: ../_mitogen_only.yml
when: not is_mitogen
- mitogen_get_stack: - mitogen_get_stack:
register: out register: out
- assert_equal: - assert_equal:
@ -318,14 +308,13 @@
}, },
] ]
tags: tags:
- mitogen_only
- stack_construction - stack_construction
- hosts: cd-newuser-normal-normal - hosts: cd-newuser-normal-normal
tasks: tasks:
- meta: end_play - include_tasks: ../_mitogen_only.yml
when: not is_mitogen
- mitogen_get_stack: - mitogen_get_stack:
delegate_to: cd-alias delegate_to: cd-alias
register: out register: out
@ -362,14 +351,13 @@
}, },
] ]
tags: tags:
- mitogen_only
- stack_construction - stack_construction
- hosts: cd-newuser-normal-normal - hosts: cd-newuser-normal-normal
tasks: tasks:
- meta: end_play - include_tasks: ../_mitogen_only.yml
when: not is_mitogen
- local_action: mitogen_get_stack - local_action: mitogen_get_stack
register: out register: out
- assert_equal: - assert_equal:
@ -383,14 +371,13 @@
}, },
] ]
tags: tags:
- mitogen_only
- stack_construction - stack_construction
- hosts: cd-newuser-doas-normal - hosts: cd-newuser-doas-normal
tasks: tasks:
- meta: end_play - include_tasks: ../_mitogen_only.yml
when: not is_mitogen
- mitogen_get_stack: - mitogen_get_stack:
register: out register: out
- assert_equal: - assert_equal:
@ -420,4 +407,5 @@
}, },
] ]
tags: tags:
- mitogen_only
- stack_construction - stack_construction

@ -4,8 +4,7 @@
- name: integration/context_service/disconnect_cleanup.yml - name: integration/context_service/disconnect_cleanup.yml
hosts: test-targets[0] hosts: test-targets[0]
tasks: tasks:
- meta: end_play - include_tasks: ../_mitogen_only.yml
when: not is_mitogen
- meta: end_play - meta: end_play
when: when:
@ -50,3 +49,4 @@
# that: out.dump|length == play_hosts|length # just the ssh account # that: out.dump|length == play_hosts|length # just the ssh account
tags: tags:
- disconnect_cleanup - disconnect_cleanup
- mitogen_only

@ -3,8 +3,7 @@
- name: integration/context_service/remote_name.yml - name: integration/context_service/remote_name.yml
hosts: test-targets[0] hosts: test-targets[0]
tasks: tasks:
- meta: end_play - include_tasks: ../_mitogen_only.yml
when: not is_mitogen
# Too much hassle to make this work for OSX # Too much hassle to make this work for OSX
- meta: end_play - meta: end_play
@ -32,4 +31,5 @@
- out.stdout is match('.*python([0-9.]+)?\(mitogen:ansible\)') - out.stdout is match('.*python([0-9.]+)?\(mitogen:ansible\)')
fail_msg: out={{out}} fail_msg: out={{out}}
tags: tags:
- mitogen_only
- remote_name - remote_name

@ -4,8 +4,7 @@
tasks: tasks:
# FIXME Without Mitogen Ansible often reads stdin before the module. # FIXME Without Mitogen Ansible often reads stdin before the module.
# Either don't read directly from stdin, or figure out the cause. # Either don't read directly from stdin, or figure out the cause.
- meta: end_play - include_tasks: ../_mitogen_only.yml
when: not is_mitogen
- custom_python_new_style_missing_interpreter: - custom_python_new_style_missing_interpreter:
foo: true foo: true
@ -22,3 +21,4 @@
fail_msg: out={{out}} fail_msg: out={{out}}
tags: tags:
- custom_python_new_style_module - custom_python_new_style_module
- mitogen_only

@ -3,8 +3,7 @@
tasks: tasks:
# FIXME Without Mitogen Ansible often reads stdin before the module. # FIXME Without Mitogen Ansible often reads stdin before the module.
# Either don't read directly from stdin, or figure out the cause. # Either don't read directly from stdin, or figure out the cause.
- meta: end_play - include_tasks: ../_mitogen_only.yml
when: not is_mitogen
- custom_python_new_style_module: - custom_python_new_style_module:
foo: true foo: true
@ -30,3 +29,4 @@
fail_msg: out={{out}} fail_msg: out={{out}}
tags: tags:
- custom_python_new_style_module - custom_python_new_style_module
- mitogen_only

@ -7,13 +7,14 @@
- name: integration/runner/custom_python_prehistoric_module.yml - name: integration/runner/custom_python_prehistoric_module.yml
hosts: test-targets hosts: test-targets
tasks: tasks:
- include_tasks: ../_mitogen_only.yml
- custom_python_prehistoric_module: - custom_python_prehistoric_module:
register: out register: out
when: is_mitogen
- assert: - assert:
that: out.ok that: out.ok
fail_msg: out={{out}} fail_msg: out={{out}}
when: is_mitogen
tags: tags:
- custom_python_prehistoric_module - custom_python_prehistoric_module
- mitogen_only

@ -6,7 +6,7 @@
hosts: test-targets[0] hosts: test-targets[0]
gather_facts: true gather_facts: true
tasks: tasks:
- include: _etc_environment_user.yml - include_tasks: _etc_environment_user.yml
when: ansible_system == "Linux" and is_mitogen when: ansible_system == "Linux" and is_mitogen
- include_tasks: _etc_environment_global.yml - include_tasks: _etc_environment_global.yml

@ -1,6 +1,7 @@
- name: integration/runner/forking_active.yml - name: integration/runner/forking_active.yml
hosts: test-targets hosts: test-targets
tasks: tasks:
- include_tasks: ../_mitogen_only.yml
# Verify mitogen_task_isolation=fork triggers forking. # Verify mitogen_task_isolation=fork triggers forking.
@ -13,21 +14,19 @@
register: fork_proc1 register: fork_proc1
vars: vars:
mitogen_task_isolation: fork mitogen_task_isolation: fork
when: is_mitogen
- name: get force-forked process ID again. - name: get force-forked process ID again.
custom_python_detect_environment: custom_python_detect_environment:
register: fork_proc2 register: fork_proc2
vars: vars:
mitogen_task_isolation: fork mitogen_task_isolation: fork
when: is_mitogen
- assert: - assert:
that: that:
- fork_proc1.pid != sync_proc1.pid - fork_proc1.pid != sync_proc1.pid
- fork_proc1.pid != fork_proc2.pid - fork_proc1.pid != fork_proc2.pid
fail_msg: fork_proc1={{fork_proc1}} sync_proc1={{sync_proc1}} fork_proc2={{fork_proc2}} fail_msg: fork_proc1={{fork_proc1}} sync_proc1={{sync_proc1}} fork_proc2={{fork_proc2}}
when: is_mitogen
tags: tags:
- forking_active - forking_active
- mitogen_only

@ -2,6 +2,7 @@
- name: integration/runner/forking_correct_parent.yml - name: integration/runner/forking_correct_parent.yml
hosts: test-targets hosts: test-targets
tasks: tasks:
- include_tasks: ../_mitogen_only.yml
# Verify mitogen_task_isolation=fork forks from "virginal fork parent", not # Verify mitogen_task_isolation=fork forks from "virginal fork parent", not
# shared interpreter, but only if forking is enabled (e.g. that's never true # shared interpreter, but only if forking is enabled (e.g. that's never true
@ -14,35 +15,34 @@
self._connection.init_child_result['fork_context'] is not None self._connection.init_child_result['fork_context'] is not None
) )
register: forkmode register: forkmode
when: is_mitogen
- name: get regular process ID. - name: get regular process ID.
custom_python_detect_environment: custom_python_detect_environment:
register: regular_proc register: regular_proc
when: is_mitogen
- name: get force-forked process ID again. - name: get force-forked process ID again.
custom_python_detect_environment: custom_python_detect_environment:
register: fork_proc register: fork_proc
vars: vars:
mitogen_task_isolation: fork mitogen_task_isolation: fork
when: is_mitogen
- assert: - assert:
that: that:
- fork_proc.pid != regular_proc.pid - fork_proc.pid != regular_proc.pid
fail_msg: fork_proc={{fork_proc}} regular_proc={{regular_proc}} fail_msg: fork_proc={{fork_proc}} regular_proc={{regular_proc}}
when: is_mitogen
- assert: - assert:
that: fork_proc.ppid != regular_proc.pid that: fork_proc.ppid != regular_proc.pid
fail_msg: fork_proc={{fork_proc}} regular_proc={{regular_proc}} fail_msg: fork_proc={{fork_proc}} regular_proc={{regular_proc}}
when: is_mitogen and forkmode.uses_fork when:
- forkmode.uses_fork
- assert: - assert:
that: fork_proc.ppid == regular_proc.pid that: fork_proc.ppid == regular_proc.pid
fail_msg: fork_proc={{fork_proc}} regular_proc={{regular_proc}} fail_msg: fork_proc={{fork_proc}} regular_proc={{regular_proc}}
when: is_mitogen and not forkmode.uses_fork when:
- not forkmode.uses_fork
tags: tags:
- forking_correct_parent - forking_correct_parent
- mitogen_only

@ -3,22 +3,21 @@
- name: integration/runner/forking_inactive.yml - name: integration/runner/forking_inactive.yml
hosts: test-targets hosts: test-targets
tasks: tasks:
- include_tasks: ../_mitogen_only.yml
- name: get process ID. - name: get process ID.
custom_python_detect_environment: custom_python_detect_environment:
register: sync_proc1 register: sync_proc1
when: is_mitogen
- name: get process ID again. - name: get process ID again.
custom_python_detect_environment: custom_python_detect_environment:
register: sync_proc2 register: sync_proc2
when: is_mitogen
- assert: - assert:
that: that:
- sync_proc1.pid == sync_proc2.pid - sync_proc1.pid == sync_proc2.pid
fail_msg: sync_proc1={{sync_proc1}} sync_proc2={{sync_proc2}} fail_msg: sync_proc1={{sync_proc1}} sync_proc2={{sync_proc2}}
when: is_mitogen
tags: tags:
- forking_inactive - forking_inactive
- mitogen_only

@ -6,8 +6,7 @@
vars: vars:
ansible_private_key_file: ~/fakekey ansible_private_key_file: ~/fakekey
tasks: tasks:
- meta: end_play - include_tasks: ../_mitogen_only.yml
when: not is_mitogen
- mitogen_get_stack: - mitogen_get_stack:
register: out register: out
@ -20,3 +19,4 @@
fail_msg: out={{out}} fail_msg: out={{out}}
tags: tags:
- config - config
- mitogen_only

@ -3,6 +3,8 @@
- name: integration/ssh/timeouts.yml - name: integration/ssh/timeouts.yml
hosts: test-targets hosts: test-targets
tasks: tasks:
- include_tasks: ../_mitogen_only.yml
- name: Cause Ansible connection timeout - name: Cause Ansible connection timeout
connection: local connection: local
environment: environment:
@ -19,7 +21,6 @@
chdir: ../.. chdir: ../..
register: out register: out
ignore_errors: true ignore_errors: true
when: is_mitogen
- name: Verify connection timeout occurred - name: Verify connection timeout occurred
assert: assert:
@ -31,6 +32,6 @@
- | - |
'"msg": "Connection timed out."' in out.stdout '"msg": "Connection timed out."' in out.stdout
fail_msg: out={{out}} fail_msg: out={{out}}
when: is_mitogen
tags: tags:
- mitogen_only
- timeouts - timeouts

@ -13,6 +13,8 @@
-o "ControlPath /tmp/mitogen-ansible-test-{{18446744073709551615|random}}" -o "ControlPath /tmp/mitogen-ansible-test-{{18446744073709551615|random}}"
tasks: tasks:
- include_tasks: ../_mitogen_only.yml
- name: ansible_ssh_user, ansible_ssh_pass - name: ansible_ssh_user, ansible_ssh_pass
shell: > shell: >
ANSIBLE_ANY_ERRORS_FATAL=false ANSIBLE_ANY_ERRORS_FATAL=false
@ -28,7 +30,6 @@
args: args:
chdir: ../.. chdir: ../..
register: out register: out
when: is_mitogen
- name: ansible_ssh_user, wrong ansible_ssh_pass - name: ansible_ssh_user, wrong ansible_ssh_pass
shell: > shell: >
@ -46,13 +47,11 @@
chdir: ../.. chdir: ../..
register: out register: out
ignore_errors: true ignore_errors: true
when: is_mitogen
- assert: - assert:
that: that:
- out.rc == 4 # ansible.executor.task_queue_manager.TaskQueueManager.RUN_UNREACHABLE_HOSTS - out.rc == 4 # ansible.executor.task_queue_manager.TaskQueueManager.RUN_UNREACHABLE_HOSTS
fail_msg: out={{out}} fail_msg: out={{out}}
when: is_mitogen
- name: ansible_user, ansible_ssh_pass - name: ansible_user, ansible_ssh_pass
@ -70,7 +69,6 @@
args: args:
chdir: ../.. chdir: ../..
register: out register: out
when: is_mitogen
- name: ansible_user, wrong ansible_ssh_pass - name: ansible_user, wrong ansible_ssh_pass
shell: > shell: >
@ -88,13 +86,11 @@
chdir: ../.. chdir: ../..
register: out register: out
ignore_errors: true ignore_errors: true
when: is_mitogen
- assert: - assert:
that: that:
- out.rc == 4 # ansible.executor.task_queue_manager.TaskQueueManager.RUN_UNREACHABLE_HOSTS - out.rc == 4 # ansible.executor.task_queue_manager.TaskQueueManager.RUN_UNREACHABLE_HOSTS
fail_msg: out={{out}} fail_msg: out={{out}}
when: is_mitogen
- name: ansible_user, ansible_password - name: ansible_user, ansible_password
@ -112,7 +108,6 @@
args: args:
chdir: ../.. chdir: ../..
register: out register: out
when: is_mitogen
- name: ansible_user, wrong ansible_password - name: ansible_user, wrong ansible_password
shell: > shell: >
@ -130,13 +125,11 @@
chdir: ../.. chdir: ../..
register: out register: out
ignore_errors: true ignore_errors: true
when: is_mitogen
- assert: - assert:
that: that:
- out.rc == 4 # ansible.executor.task_queue_manager.TaskQueueManager.RUN_UNREACHABLE_HOSTS - out.rc == 4 # ansible.executor.task_queue_manager.TaskQueueManager.RUN_UNREACHABLE_HOSTS
fail_msg: out={{out}} fail_msg: out={{out}}
when: is_mitogen
- name: setup ansible_ssh_private_key_file - name: setup ansible_ssh_private_key_file
@ -159,7 +152,6 @@
args: args:
chdir: ../.. chdir: ../..
register: out register: out
when: is_mitogen
- name: ansible_user, wrong ansible_ssh_private_key_file - name: ansible_user, wrong ansible_ssh_private_key_file
shell: > shell: >
@ -177,10 +169,10 @@
chdir: ../.. chdir: ../..
register: out register: out
ignore_errors: true ignore_errors: true
when: is_mitogen
- assert: - assert:
that: that:
- out.rc == 4 # ansible.executor.task_queue_manager.TaskQueueManager.RUN_UNREACHABLE_HOSTS - out.rc == 4 # ansible.executor.task_queue_manager.TaskQueueManager.RUN_UNREACHABLE_HOSTS
fail_msg: out={{out}} fail_msg: out={{out}}
when: is_mitogen tags:
- mitogen_only

@ -3,8 +3,7 @@
hosts: test-targets hosts: test-targets
gather_facts: false gather_facts: false
tasks: tasks:
- meta: end_play - include_tasks: ../_mitogen_only.yml
when: not is_mitogen
- meta: end_play - meta: end_play
when: when:
@ -23,3 +22,4 @@
fail_msg: out={{out}} fail_msg: out={{out}}
tags: tags:
- kubectl - kubectl
- mitogen_only

@ -3,8 +3,7 @@
hosts: test-targets hosts: test-targets
gather_facts: false gather_facts: false
tasks: tasks:
- meta: end_play - include_tasks: ../_mitogen_only.yml
when: not is_mitogen
- custom_python_detect_environment: - custom_python_detect_environment:
vars: vars:
@ -19,3 +18,4 @@
fail_msg: out={{out}} fail_msg: out={{out}}
tags: tags:
- lxc - lxc
- mitogen_only

@ -3,8 +3,7 @@
hosts: test-targets hosts: test-targets
gather_facts: false gather_facts: false
tasks: tasks:
- meta: end_play - include_tasks: ../_mitogen_only.yml
when: not is_mitogen
- custom_python_detect_environment: - custom_python_detect_environment:
vars: vars:
@ -19,3 +18,4 @@
fail_msg: out={{out}} fail_msg: out={{out}}
tags: tags:
- lxd - lxd
- mitogen_only

@ -3,8 +3,7 @@
hosts: test-targets hosts: test-targets
gather_facts: false gather_facts: false
tasks: tasks:
- meta: end_play - include_tasks: ../_mitogen_only.yml
when: not is_mitogen
- custom_python_detect_environment: - custom_python_detect_environment:
vars: vars:
@ -22,3 +21,4 @@
fail_msg: out={{out}} fail_msg: out={{out}}
tags: tags:
- mitogen_doas - mitogen_doas
- mitogen_only

@ -3,8 +3,7 @@
hosts: test-targets hosts: test-targets
gather_facts: false gather_facts: false
tasks: tasks:
- meta: end_play - include_tasks: ../_mitogen_only.yml
when: not is_mitogen
- custom_python_detect_environment: - custom_python_detect_environment:
vars: vars:
@ -23,4 +22,5 @@
left: (out.env.ORIGINAL_ARGV|from_json)[1:9] left: (out.env.ORIGINAL_ARGV|from_json)[1:9]
right: ['-u', 'root', '-H', '-r', 'somerole', '-t', 'sometype', '--'] right: ['-u', 'root', '-H', '-r', 'somerole', '-t', 'sometype', '--']
tags: tags:
- mitogen_only
- mitogen_sudo - mitogen_sudo

@ -8,10 +8,8 @@
any_errors_fatal: false any_errors_fatal: false
connection: local connection: local
tasks: tasks:
- meta: end_play - include_tasks: ../_mitogen_only.yml
when: not is_mitogen - include_tasks: _end_play_if_not_sudo_linux.yml
- include: _end_play_if_not_sudo_linux.yml
- name: Run stub-lxc-info.py - name: Run stub-lxc-info.py
command: | command: |
@ -35,3 +33,4 @@
fail_msg: result={{result}} fail_msg: result={{result}}
tags: tags:
- stns_lxc - stns_lxc
- mitogen_only

@ -8,10 +8,8 @@
any_errors_fatal: false any_errors_fatal: false
connection: local connection: local
tasks: tasks:
- meta: end_play - include_tasks: ../_mitogen_only.yml
when: not is_mitogen - include_tasks: _end_play_if_not_sudo_linux.yml
- include: _end_play_if_not_sudo_linux.yml
- name: Run ansible stub-lxc.py - name: Run ansible stub-lxc.py
command: | command: |
@ -34,4 +32,5 @@
that: result.rc == 0 that: result.rc == 0
fail_msg: result={{result}} fail_msg: result={{result}}
tags: tags:
- mitogen_only
- sens_lxd - sens_lxd

@ -1,4 +1,4 @@
- include: kubectl.yml - include_playbook: kubectl.yml
tags: tags:
- kubectl - kubectl

@ -5,7 +5,7 @@
- name: integration/transport_config/become.yml - name: integration/transport_config/become.yml
hosts: tc-become-unset hosts: tc-become-unset
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert: - assert:
that: that:
@ -13,11 +13,13 @@
- out.result[0].method == "ssh" - out.result[0].method == "ssh"
- out.result[0].kwargs.username == "ansible-cfg-remote-user" - out.result[0].kwargs.username == "ansible-cfg-remote-user"
fail_msg: out={{out}} fail_msg: out={{out}}
tags:
- mitogen_only
- hosts: tc-become-unset - hosts: tc-become-unset
vars: {mitogen_via: becomeuser@tc-become-set} vars: {mitogen_via: becomeuser@tc-become-set}
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert: - assert:
that: that:
@ -31,6 +33,8 @@
- out.result[2].method == "ssh" - out.result[2].method == "ssh"
- out.result[2].kwargs.hostname == "tc-become-unset" - out.result[2].kwargs.hostname == "tc-become-unset"
fail_msg: out={{out}} fail_msg: out={{out}}
tags:
- mitogen_only
# Become set. # Become set.
@ -39,7 +43,7 @@
become: true become: true
become_user: becomeuser become_user: becomeuser
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert: - assert:
that: that:
@ -49,13 +53,15 @@
- out.result[1].method == "sudo" - out.result[1].method == "sudo"
- out.result[1].kwargs.username == "becomeuser" - out.result[1].kwargs.username == "becomeuser"
fail_msg: out={{out}} fail_msg: out={{out}}
tags:
- mitogen_only
- hosts: tc-become-set - hosts: tc-become-set
vars: {mitogen_via: tc-become-unset} vars: {mitogen_via: tc-become-unset}
become: true become: true
become_user: becomeuser become_user: becomeuser
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert: - assert:
that: that:
@ -70,3 +76,5 @@
- out.result[2].method == "sudo" - out.result[2].method == "sudo"
- out.result[2].kwargs.username == "becomeuser" - out.result[2].kwargs.username == "becomeuser"
fail_msg: out={{out}} fail_msg: out={{out}}
tags:
- mitogen_only

@ -6,7 +6,7 @@
hosts: tc-become-method-unset hosts: tc-become-method-unset
become: true become: true
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert: - assert:
that: that:
@ -14,11 +14,13 @@
- out.result[0].method == "ssh" - out.result[0].method == "ssh"
- out.result[1].method == "sudo" - out.result[1].method == "sudo"
fail_msg: out={{out}} fail_msg: out={{out}}
tags:
- mitogen_only
- hosts: tc-become-method-unset - hosts: tc-become-method-unset
vars: {mitogen_via: becomeuser@tc-become-method-su} vars: {mitogen_via: becomeuser@tc-become-method-su}
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert: - assert:
that: that:
@ -29,6 +31,8 @@
- out.result[2].method == "ssh" - out.result[2].method == "ssh"
- out.result[2].kwargs.hostname == "tc-become-method-unset" - out.result[2].kwargs.hostname == "tc-become-method-unset"
fail_msg: out={{out}} fail_msg: out={{out}}
tags:
- mitogen_only
# ansible_become_method=su # ansible_become_method=su
@ -36,7 +40,7 @@
become: true become: true
become_user: becomeuser become_user: becomeuser
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert: - assert:
that: that:
@ -45,13 +49,15 @@
- out.result[1].method == "su" - out.result[1].method == "su"
- out.result[1].kwargs.username == "becomeuser" - out.result[1].kwargs.username == "becomeuser"
fail_msg: out={{out}} fail_msg: out={{out}}
tags:
- mitogen_only
- hosts: tc-become-method-su - hosts: tc-become-method-su
vars: {mitogen_via: tc-become-method-unset} vars: {mitogen_via: tc-become-method-unset}
become: true become: true
become_user: becomeuser become_user: becomeuser
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert: - assert:
that: that:
@ -65,6 +71,8 @@
- out.result[2].method == "su" - out.result[2].method == "su"
- out.result[2].kwargs.username == "becomeuser" - out.result[2].kwargs.username == "becomeuser"
fail_msg: out={{out}} fail_msg: out={{out}}
tags:
- mitogen_only
@ -72,7 +80,7 @@
- hosts: tc-become-method-unset - hosts: tc-become-method-unset
vars: {mitogen_via: "doas:doasuser@tc-become-method-su"} vars: {mitogen_via: "doas:doasuser@tc-become-method-su"}
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert: - assert:
that: that:
@ -86,3 +94,5 @@
- out.result[2].method == "ssh" - out.result[2].method == "ssh"
- out.result[2].kwargs.hostname == "tc-become-method-unset" - out.result[2].kwargs.hostname == "tc-become-method-unset"
fail_msg: out={{out}} fail_msg: out={{out}}
tags:
- mitogen_only

@ -6,7 +6,7 @@
hosts: tc-become-pass-unset hosts: tc-become-pass-unset
become: true become: true
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert: - assert:
that: that:
@ -15,13 +15,15 @@
- out.result[1].method == "sudo" - out.result[1].method == "sudo"
- out.result[1].kwargs.password == None - out.result[1].kwargs.password == None
fail_msg: out={{out}} fail_msg: out={{out}}
tags:
- mitogen_only
# Not set, unbecoming mitogen_via= # Not set, unbecoming mitogen_via=
- hosts: tc-become-pass-unset - hosts: tc-become-pass-unset
become: true become: true
vars: {mitogen_via: tc-become-pass-password} vars: {mitogen_via: tc-become-pass-password}
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert: - assert:
that: that:
@ -31,13 +33,15 @@
- out.result[2].method == "sudo" - out.result[2].method == "sudo"
- out.result[2].kwargs.password == None - out.result[2].kwargs.password == None
fail_msg: out={{out}} fail_msg: out={{out}}
tags:
- mitogen_only
# Not set, becoming mitogen_via= # Not set, becoming mitogen_via=
- hosts: tc-become-pass-unset - hosts: tc-become-pass-unset
become: true become: true
vars: {mitogen_via: viapass@tc-become-pass-password} vars: {mitogen_via: viapass@tc-become-pass-password}
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert: - assert:
that: that:
@ -49,13 +53,15 @@
- out.result[3].method == "sudo" - out.result[3].method == "sudo"
- out.result[3].kwargs.password == None - out.result[3].kwargs.password == None
fail_msg: out={{out}} fail_msg: out={{out}}
tags:
- mitogen_only
# ansible_become_password= set. # ansible_become_password= set.
- hosts: tc-become-pass-password - hosts: tc-become-pass-password
become: true become: true
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert: - assert:
that: that:
@ -64,6 +70,8 @@
- out.result[1].method == "sudo" - out.result[1].method == "sudo"
- out.result[1].kwargs.password == "apassword" - out.result[1].kwargs.password == "apassword"
fail_msg: out={{out}} fail_msg: out={{out}}
tags:
- mitogen_only
# ansible_become_password=, via= # ansible_become_password=, via=
@ -71,7 +79,7 @@
vars: {mitogen_via: root@tc-become-pass-pass} vars: {mitogen_via: root@tc-become-pass-pass}
become: true become: true
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert: - assert:
that: that:
@ -83,13 +91,15 @@
- out.result[3].method == "sudo" - out.result[3].method == "sudo"
- out.result[3].kwargs.password == "apassword" - out.result[3].kwargs.password == "apassword"
fail_msg: out={{out}} fail_msg: out={{out}}
tags:
- mitogen_only
# ansible_become_pass= # ansible_become_pass=
- hosts: tc-become-pass-pass - hosts: tc-become-pass-pass
become: true become: true
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert: - assert:
that: that:
@ -98,6 +108,8 @@
- out.result[1].method == "sudo" - out.result[1].method == "sudo"
- out.result[1].kwargs.password == "apass" - out.result[1].kwargs.password == "apass"
fail_msg: out={{out}} fail_msg: out={{out}}
tags:
- mitogen_only
# ansible_become_pass=, via= # ansible_become_pass=, via=
@ -105,7 +117,7 @@
vars: {mitogen_via: root@tc-become-pass-password} vars: {mitogen_via: root@tc-become-pass-password}
become: true become: true
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert: - assert:
that: that:
@ -117,12 +129,14 @@
- out.result[3].method == "sudo" - out.result[3].method == "sudo"
- out.result[3].kwargs.password == "apass" - out.result[3].kwargs.password == "apass"
fail_msg: out={{out}} fail_msg: out={{out}}
tags:
- mitogen_only
- hosts: tc-become-pass-both - hosts: tc-become-pass-both
become: true become: true
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert: - assert:
that: that:
@ -133,13 +147,15 @@
# to ansible_become_pass over ansible_become_password. # to ansible_become_pass over ansible_become_password.
- out.result[1].kwargs.password == "bpass" - out.result[1].kwargs.password == "bpass"
fail_msg: out={{out}} fail_msg: out={{out}}
tags:
- mitogen_only
# both, mitogen_via # both, mitogen_via
- hosts: tc-become-pass-unset - hosts: tc-become-pass-unset
vars: {mitogen_via: root@tc-become-pass-both} vars: {mitogen_via: root@tc-become-pass-both}
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert: - assert:
that: that:
@ -149,3 +165,5 @@
- out.result[1].kwargs.password == "bpass" - out.result[1].kwargs.password == "bpass"
- out.result[2].method == "ssh" - out.result[2].method == "ssh"
fail_msg: out={{out}} fail_msg: out={{out}}
tags:
- mitogen_only

@ -6,7 +6,7 @@
hosts: tc-become-user-unset hosts: tc-become-user-unset
become: true become: true
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert: - assert:
that: that:
@ -15,13 +15,15 @@
- out.result[1].method == "sudo" - out.result[1].method == "sudo"
- out.result[1].kwargs.username == "root" - out.result[1].kwargs.username == "root"
fail_msg: out={{out}} fail_msg: out={{out}}
tags:
- mitogen_only
# Not set, unbecoming mitogen_via= # Not set, unbecoming mitogen_via=
- hosts: tc-become-user-unset - hosts: tc-become-user-unset
become: true become: true
vars: {mitogen_via: tc-become-user-set} vars: {mitogen_via: tc-become-user-set}
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert: - assert:
that: that:
@ -31,13 +33,15 @@
- out.result[2].method == "sudo" - out.result[2].method == "sudo"
- out.result[2].kwargs.username == "root" - out.result[2].kwargs.username == "root"
fail_msg: out={{out}} fail_msg: out={{out}}
tags:
- mitogen_only
# Not set, becoming mitogen_via= # Not set, becoming mitogen_via=
- hosts: tc-become-user-unset - hosts: tc-become-user-unset
become: true become: true
vars: {mitogen_via: viauser@tc-become-user-set} vars: {mitogen_via: viauser@tc-become-user-set}
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert: - assert:
that: that:
@ -49,13 +53,15 @@
- out.result[3].method == "sudo" - out.result[3].method == "sudo"
- out.result[3].kwargs.username == "root" - out.result[3].kwargs.username == "root"
fail_msg: out={{out}} fail_msg: out={{out}}
tags:
- mitogen_only
# ansible_become_user= set. # ansible_become_user= set.
- hosts: tc-become-user-set - hosts: tc-become-user-set
become: true become: true
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert: - assert:
that: that:
@ -64,6 +70,8 @@
- out.result[1].method == "sudo" - out.result[1].method == "sudo"
- out.result[1].kwargs.username == "ansi-become-user" - out.result[1].kwargs.username == "ansi-become-user"
fail_msg: out={{out}} fail_msg: out={{out}}
tags:
- mitogen_only
# ansible_become_user=, unbecoming via= # ansible_become_user=, unbecoming via=
@ -71,7 +79,7 @@
vars: {mitogen_via: tc-become-user-unset} vars: {mitogen_via: tc-become-user-unset}
become: true become: true
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert: - assert:
that: that:
@ -85,6 +93,8 @@
- out.result[2].method == "sudo" - out.result[2].method == "sudo"
- out.result[2].kwargs.username == "ansi-become-user" - out.result[2].kwargs.username == "ansi-become-user"
fail_msg: out={{out}} fail_msg: out={{out}}
tags:
- mitogen_only
# ansible_become_user=, becoming via= # ansible_become_user=, becoming via=
@ -92,7 +102,7 @@
vars: {mitogen_via: "doas:doasuser@tc-become-user-unset"} vars: {mitogen_via: "doas:doasuser@tc-become-user-unset"}
become: true become: true
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert: - assert:
that: that:
@ -109,4 +119,6 @@
- out.result[3].method == "sudo" - out.result[3].method == "sudo"
- out.result[3].kwargs.username == "ansi-become-user" - out.result[3].kwargs.username == "ansi-become-user"
fail_msg: out={{out}} fail_msg: out={{out}}
tags:
- mitogen_only

@ -6,16 +6,18 @@
- name: integration/transport_config/password.yml - name: integration/transport_config/password.yml
hosts: tc-password-unset hosts: tc-password-unset
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].kwargs.password left: out.result[0].kwargs.password
right: "" # actually null, but assert_equal limitation right: "" # actually null, but assert_equal limitation
tags:
- mitogen_only
- hosts: tc-password-unset - hosts: tc-password-unset
vars: {mitogen_via: tc-password-explicit-ssh} vars: {mitogen_via: tc-password-explicit-ssh}
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].kwargs.password left: out.result[0].kwargs.password
@ -23,22 +25,26 @@
- assert_equal: - assert_equal:
left: out.result[1].kwargs.password left: out.result[1].kwargs.password
right: "" right: ""
tags:
- mitogen_only
# ansible_ssh_user= # ansible_ssh_user=
- hosts: tc-password-explicit-ssh - hosts: tc-password-explicit-ssh
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].kwargs.password left: out.result[0].kwargs.password
right: "ansi-ssh-pass" right: "ansi-ssh-pass"
tags:
- mitogen_only
- hosts: tc-password-explicit-ssh - hosts: tc-password-explicit-ssh
vars: {mitogen_via: tc-password-unset} vars: {mitogen_via: tc-password-unset}
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].kwargs.password left: out.result[0].kwargs.password
@ -46,22 +52,26 @@
- assert_equal: - assert_equal:
left: out.result[1].kwargs.password left: out.result[1].kwargs.password
right: "ansi-ssh-pass" right: "ansi-ssh-pass"
tags:
- mitogen_only
# ansible_user= # ansible_user=
- hosts: tc-password-explicit-pass - hosts: tc-password-explicit-pass
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].kwargs.password left: out.result[0].kwargs.password
right: "ansi-pass" right: "ansi-pass"
tags:
- mitogen_only
- hosts: tc-password-explicit-pass - hosts: tc-password-explicit-pass
vars: {mitogen_via: tc-password-unset} vars: {mitogen_via: tc-password-unset}
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].kwargs.password left: out.result[0].kwargs.password
@ -69,22 +79,26 @@
- assert_equal: - assert_equal:
left: out.result[1].kwargs.password left: out.result[1].kwargs.password
right: "ansi-pass" right: "ansi-pass"
tags:
- mitogen_only
# both; ansible_ssh_user= takes precedence according to play_context.py. # both; ansible_ssh_user= takes precedence according to play_context.py.
- hosts: tc-password-explicit-both - hosts: tc-password-explicit-both
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].kwargs.password left: out.result[0].kwargs.password
right: "c.b.a" right: "c.b.a"
tags:
- mitogen_only
- hosts: tc-password-explicit-both - hosts: tc-password-explicit-both
vars: {mitogen_via: tc-password-unset} vars: {mitogen_via: tc-password-unset}
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].kwargs.password left: out.result[0].kwargs.password
@ -92,3 +106,5 @@
- assert_equal: - assert_equal:
left: out.result[1].kwargs.password left: out.result[1].kwargs.password
right: "c.b.a" right: "c.b.a"
tags:
- mitogen_only

@ -5,7 +5,7 @@
- name: integration/transport_config/port.yml - name: integration/transport_config/port.yml
hosts: tc-port-unset hosts: tc-port-unset
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert: - assert:
that: that:
@ -13,12 +13,14 @@
- out.result[0].method == "ssh" - out.result[0].method == "ssh"
- out.result[0].kwargs.port == None - out.result[0].kwargs.port == None
fail_msg: out={{out}} fail_msg: out={{out}}
tags:
- mitogen_only
# Not set, mitogen_via= # Not set, mitogen_via=
- hosts: tc-port-explicit-ssh - hosts: tc-port-explicit-ssh
vars: {mitogen_via: tc-port-unset} vars: {mitogen_via: tc-port-unset}
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert: - assert:
that: that:
@ -28,11 +30,13 @@
- out.result[1].method == "ssh" - out.result[1].method == "ssh"
- out.result[1].kwargs.port == 4321 - out.result[1].kwargs.port == 4321
fail_msg: out={{out}} fail_msg: out={{out}}
tags:
- mitogen_only
# ansible_ssh_port= # ansible_ssh_port=
- hosts: tc-port-explicit-ssh - hosts: tc-port-explicit-ssh
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert: - assert:
that: that:
@ -40,11 +44,13 @@
- out.result[0].method == "ssh" - out.result[0].method == "ssh"
- out.result[0].kwargs.port == 4321 - out.result[0].kwargs.port == 4321
fail_msg: out={{out}} fail_msg: out={{out}}
tags:
- mitogen_only
- hosts: tc-port-unset - hosts: tc-port-unset
vars: {mitogen_via: tc-port-explicit-ssh} vars: {mitogen_via: tc-port-explicit-ssh}
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert: - assert:
that: that:
@ -54,11 +60,13 @@
- out.result[1].method == "ssh" - out.result[1].method == "ssh"
- out.result[1].kwargs.port == None - out.result[1].kwargs.port == None
fail_msg: out={{out}} fail_msg: out={{out}}
tags:
- mitogen_only
# ansible_port= # ansible_port=
- hosts: tc-port-explicit-port - hosts: tc-port-explicit-port
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert: - assert:
that: that:
@ -66,11 +74,13 @@
- out.result[0].method == "ssh" - out.result[0].method == "ssh"
- out.result[0].kwargs.port == 1234 - out.result[0].kwargs.port == 1234
fail_msg: out={{out}} fail_msg: out={{out}}
tags:
- mitogen_only
- hosts: tc-port-unset - hosts: tc-port-unset
vars: {mitogen_via: tc-port-explicit-port} vars: {mitogen_via: tc-port-explicit-port}
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert: - assert:
that: that:
@ -80,12 +90,14 @@
- out.result[1].method == "ssh" - out.result[1].method == "ssh"
- out.result[1].kwargs.port == None - out.result[1].kwargs.port == None
fail_msg: out={{out}} fail_msg: out={{out}}
tags:
- mitogen_only
# both, ssh takes precedence # both, ssh takes precedence
- hosts: tc-port-both - hosts: tc-port-both
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert: - assert:
that: that:
@ -93,11 +105,13 @@
- out.result[0].method == "ssh" - out.result[0].method == "ssh"
- out.result[0].kwargs.port == 1532 - out.result[0].kwargs.port == 1532
fail_msg: out={{out}} fail_msg: out={{out}}
tags:
- mitogen_only
- hosts: tc-port-unset - hosts: tc-port-unset
vars: {mitogen_via: tc-port-both} vars: {mitogen_via: tc-port-both}
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert: - assert:
that: that:
@ -107,3 +121,5 @@
- out.result[1].method == "ssh" - out.result[1].method == "ssh"
- out.result[1].kwargs.port == None - out.result[1].kwargs.port == None
fail_msg: out={{out}} fail_msg: out={{out}}
tags:
- mitogen_only

@ -7,16 +7,18 @@
- name: integration/transport_config/python_path.yml - name: integration/transport_config/python_path.yml
hosts: tc-python-path-unset hosts: tc-python-path-unset
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].kwargs.python_path left: out.result[0].kwargs.python_path
right: ["{{out.discovered_interpreter}}"] right: ["{{out.discovered_interpreter}}"]
tags:
- mitogen_only
- hosts: tc-python-path-hostvar - hosts: tc-python-path-hostvar
vars: {mitogen_via: tc-python-path-unset} vars: {mitogen_via: tc-python-path-unset}
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].kwargs.python_path left: out.result[0].kwargs.python_path
@ -24,21 +26,25 @@
- assert_equal: - assert_equal:
left: out.result[1].kwargs.python_path left: out.result[1].kwargs.python_path
right: ["/hostvar/path/to/python"] right: ["/hostvar/path/to/python"]
tags:
- mitogen_only
# Non-localhost with explicit ansible_python_interpreter # Non-localhost with explicit ansible_python_interpreter
- hosts: tc-python-path-hostvar - hosts: tc-python-path-hostvar
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].kwargs.python_path left: out.result[0].kwargs.python_path
right: [/hostvar/path/to/python] right: [/hostvar/path/to/python]
tags:
- mitogen_only
- hosts: tc-python-path-unset - hosts: tc-python-path-unset
vars: {mitogen_via: tc-python-path-hostvar} vars: {mitogen_via: tc-python-path-hostvar}
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].kwargs.python_path left: out.result[0].kwargs.python_path
@ -46,21 +52,25 @@
- assert_equal: - assert_equal:
left: out.result[1].kwargs.python_path left: out.result[1].kwargs.python_path
right: ["{{out.discovered_interpreter}}"] right: ["{{out.discovered_interpreter}}"]
tags:
- mitogen_only
# Implicit localhost gets ansible_python_interpreter=virtualenv interpreter # Implicit localhost gets ansible_python_interpreter=virtualenv interpreter
- hosts: localhost - hosts: localhost
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].kwargs.python_path left: out.result[0].kwargs.python_path
right: ["{{ansible_playbook_python}}"] right: ["{{ansible_playbook_python}}"]
tags:
- mitogen_only
- hosts: tc-python-path-unset - hosts: tc-python-path-unset
vars: {mitogen_via: localhost} vars: {mitogen_via: localhost}
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].kwargs.python_path left: out.result[0].kwargs.python_path
@ -68,22 +78,26 @@
- assert_equal: - assert_equal:
left: out.result[1].kwargs.python_path left: out.result[1].kwargs.python_path
right: ["{{out.discovered_interpreter}}"] right: ["{{out.discovered_interpreter}}"]
tags:
- mitogen_only
# explicit local connections get the same treatment as everything else. # explicit local connections get the same treatment as everything else.
- hosts: tc-python-path-local-unset - hosts: tc-python-path-local-unset
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].kwargs.python_path left: out.result[0].kwargs.python_path
right: ["{{out.discovered_interpreter}}"] right: ["{{out.discovered_interpreter}}"]
tags:
- mitogen_only
- hosts: localhost - hosts: localhost
vars: {mitogen_via: tc-python-path-local-unset} vars: {mitogen_via: tc-python-path-local-unset}
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].kwargs.python_path left: out.result[0].kwargs.python_path
@ -91,21 +105,25 @@
- assert_equal: - assert_equal:
left: out.result[1].kwargs.python_path left: out.result[1].kwargs.python_path
right: ["{{ansible_playbook_python}}"] right: ["{{ansible_playbook_python}}"]
tags:
- mitogen_only
# explicit local connection with explicit interpreter # explicit local connection with explicit interpreter
- hosts: tc-python-path-local-explicit - hosts: tc-python-path-local-explicit
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].kwargs.python_path left: out.result[0].kwargs.python_path
right: ["/a/b/c"] right: ["/a/b/c"]
tags:
- mitogen_only
- hosts: localhost - hosts: localhost
vars: {mitogen_via: tc-python-path-local-explicit} vars: {mitogen_via: tc-python-path-local-explicit}
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].kwargs.python_path left: out.result[0].kwargs.python_path
@ -113,3 +131,5 @@
- assert_equal: - assert_equal:
left: out.result[1].kwargs.python_path left: out.result[1].kwargs.python_path
right: ["{{ansible_playbook_python}}"] right: ["{{ansible_playbook_python}}"]
tags:
- mitogen_only

@ -7,16 +7,18 @@
- name: integration/transport_config/remote_addr.yml - name: integration/transport_config/remote_addr.yml
hosts: tc-remote-addr-unset hosts: tc-remote-addr-unset
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].kwargs.hostname left: out.result[0].kwargs.hostname
right: "tc-remote-addr-unset" right: "tc-remote-addr-unset"
tags:
- mitogen_only
- hosts: tc-remote-addr-unset - hosts: tc-remote-addr-unset
vars: {mitogen_via: tc-remote-addr-explicit-ssh} vars: {mitogen_via: tc-remote-addr-explicit-ssh}
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].kwargs.hostname left: out.result[0].kwargs.hostname
@ -24,22 +26,26 @@
- assert_equal: - assert_equal:
left: out.result[1].kwargs.hostname left: out.result[1].kwargs.hostname
right: "tc-remote-addr-unset" right: "tc-remote-addr-unset"
tags:
- mitogen_only
# ansible_ssh_host= # ansible_ssh_host=
- hosts: tc-remote-addr-explicit-ssh - hosts: tc-remote-addr-explicit-ssh
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].kwargs.hostname left: out.result[0].kwargs.hostname
right: "ansi.ssh.host" right: "ansi.ssh.host"
tags:
- mitogen_only
- hosts: tc-remote-addr-explicit-ssh - hosts: tc-remote-addr-explicit-ssh
vars: {mitogen_via: tc-remote-addr-unset} vars: {mitogen_via: tc-remote-addr-unset}
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].kwargs.hostname left: out.result[0].kwargs.hostname
@ -47,22 +53,26 @@
- assert_equal: - assert_equal:
left: out.result[1].kwargs.hostname left: out.result[1].kwargs.hostname
right: "ansi.ssh.host" right: "ansi.ssh.host"
tags:
- mitogen_only
# ansible_host= # ansible_host=
- hosts: tc-remote-addr-explicit-host - hosts: tc-remote-addr-explicit-host
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].kwargs.hostname left: out.result[0].kwargs.hostname
right: "ansi.host" right: "ansi.host"
tags:
- mitogen_only
- hosts: tc-remote-addr-explicit-host - hosts: tc-remote-addr-explicit-host
vars: {mitogen_via: tc-remote-addr-unset} vars: {mitogen_via: tc-remote-addr-unset}
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].kwargs.hostname left: out.result[0].kwargs.hostname
@ -70,22 +80,26 @@
- assert_equal: - assert_equal:
left: out.result[1].kwargs.hostname left: out.result[1].kwargs.hostname
right: "ansi.host" right: "ansi.host"
tags:
- mitogen_only
# both; ansible_ssh_host= takes precedence according to play_context.py. # both; ansible_ssh_host= takes precedence according to play_context.py.
- hosts: tc-remote-addr-explicit-both - hosts: tc-remote-addr-explicit-both
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].kwargs.hostname left: out.result[0].kwargs.hostname
right: "a.b.c" right: "a.b.c"
tags:
- mitogen_only
- hosts: tc-remote-addr-explicit-both - hosts: tc-remote-addr-explicit-both
vars: {mitogen_via: tc-remote-addr-unset} vars: {mitogen_via: tc-remote-addr-unset}
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].kwargs.hostname left: out.result[0].kwargs.hostname
@ -93,3 +107,5 @@
- assert_equal: - assert_equal:
left: out.result[1].kwargs.hostname left: out.result[1].kwargs.hostname
right: "a.b.c" right: "a.b.c"
tags:
- mitogen_only

@ -7,17 +7,19 @@
- name: integration/transport_config/remote_user.yml - name: integration/transport_config/remote_user.yml
hosts: tc-remote-user-unset hosts: tc-remote-user-unset
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].kwargs.username left: out.result[0].kwargs.username
# We set DEFAULT_REMOTE_USER in our ansible.cfg # We set DEFAULT_REMOTE_USER in our ansible.cfg
right: "ansible-cfg-remote-user" right: "ansible-cfg-remote-user"
tags:
- mitogen_only
- hosts: tc-remote-user-unset - hosts: tc-remote-user-unset
vars: {mitogen_via: tc-remote-user-explicit-ssh} vars: {mitogen_via: tc-remote-user-explicit-ssh}
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].kwargs.username left: out.result[0].kwargs.username
@ -25,22 +27,26 @@
- assert_equal: - assert_equal:
left: out.result[1].kwargs.username left: out.result[1].kwargs.username
right: "ansible-cfg-remote-user" right: "ansible-cfg-remote-user"
tags:
- mitogen_only
# ansible_ssh_user= # ansible_ssh_user=
- hosts: tc-remote-user-explicit-ssh - hosts: tc-remote-user-explicit-ssh
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].kwargs.username left: out.result[0].kwargs.username
right: "ansi-ssh-user" right: "ansi-ssh-user"
tags:
- mitogen_only
- hosts: tc-remote-user-explicit-ssh - hosts: tc-remote-user-explicit-ssh
vars: {mitogen_via: tc-remote-user-unset} vars: {mitogen_via: tc-remote-user-unset}
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].kwargs.username left: out.result[0].kwargs.username
@ -48,13 +54,15 @@
- assert_equal: - assert_equal:
left: out.result[1].kwargs.username left: out.result[1].kwargs.username
right: "ansi-ssh-user" right: "ansi-ssh-user"
tags:
- mitogen_only
# ansible_user= # ansible_user=
- hosts: tc-remote-user-explicit-user - hosts: tc-remote-user-explicit-user
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].kwargs.username left: out.result[0].kwargs.username
@ -63,7 +71,7 @@
- hosts: tc-remote-user-explicit-user - hosts: tc-remote-user-explicit-user
vars: {mitogen_via: tc-remote-user-unset} vars: {mitogen_via: tc-remote-user-unset}
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].kwargs.username left: out.result[0].kwargs.username
@ -71,22 +79,26 @@
- assert_equal: - assert_equal:
left: out.result[1].kwargs.username left: out.result[1].kwargs.username
right: "ansi-user" right: "ansi-user"
tags:
- mitogen_only
# both; ansible_ssh_user= takes precedence according to play_context.py. # both; ansible_ssh_user= takes precedence according to play_context.py.
- hosts: tc-remote-user-explicit-both - hosts: tc-remote-user-explicit-both
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].kwargs.username left: out.result[0].kwargs.username
right: "c.b.a" right: "c.b.a"
tags:
- mitogen_only
- hosts: tc-remote-user-explicit-both - hosts: tc-remote-user-explicit-both
vars: {mitogen_via: tc-remote-user-unset} vars: {mitogen_via: tc-remote-user-unset}
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].kwargs.username left: out.result[0].kwargs.username
@ -94,3 +106,5 @@
- assert_equal: - assert_equal:
left: out.result[1].kwargs.username left: out.result[1].kwargs.username
right: "c.b.a" right: "c.b.a"
tags:
- mitogen_only

@ -6,16 +6,18 @@
- name: integration/transport_config/transport.yml - name: integration/transport_config/transport.yml
hosts: tc-transport-unset hosts: tc-transport-unset
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].method left: out.result[0].method
right: "ssh" right: "ssh"
tags:
- mitogen_only
- hosts: tc-transport-local - hosts: tc-transport-local
vars: {mitogen_via: tc-transport-unset} vars: {mitogen_via: tc-transport-unset}
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].method left: out.result[0].method
@ -23,22 +25,26 @@
- assert_equal: - assert_equal:
left: out.result[1].method left: out.result[1].method
right: "local" right: "local"
tags:
- mitogen_only
# ansible_connection=local # ansible_connection=local
- hosts: tc-transport-local - hosts: tc-transport-local
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].method left: out.result[0].method
right: "local" right: "local"
tags:
- mitogen_only
- hosts: tc-transport-unset - hosts: tc-transport-unset
vars: {mitogen_via: tc-transport-local} vars: {mitogen_via: tc-transport-local}
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].method left: out.result[0].method
@ -46,3 +52,5 @@
- assert_equal: - assert_equal:
left: out.result[1].method left: out.result[1].method
right: "ssh" right: "ssh"
tags:
- mitogen_only

@ -7,16 +7,18 @@
- name: integration/transport_config/transport__smart.yml - name: integration/transport_config/transport__smart.yml
hosts: tc-transport-smart hosts: tc-transport-smart
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].method left: out.result[0].method
right: "ssh" right: "ssh"
tags:
- mitogen_only
- hosts: tc-transport-local - hosts: tc-transport-local
vars: {mitogen_via: tc-transport-smart} vars: {mitogen_via: tc-transport-smart}
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].method left: out.result[0].method
@ -24,22 +26,26 @@
- assert_equal: - assert_equal:
left: out.result[1].method left: out.result[1].method
right: "local" right: "local"
tags:
- mitogen_only
# ansible_connection=local # ansible_connection=local
- hosts: tc-transport-local - hosts: tc-transport-local
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].method left: out.result[0].method
right: "local" right: "local"
tags:
- mitogen_only
- hosts: tc-transport-smart - hosts: tc-transport-smart
vars: {mitogen_via: tc-transport-local} vars: {mitogen_via: tc-transport-local}
tasks: tasks:
- include: ../_mitogen_only.yml - include_tasks: ../_mitogen_only.yml
- {mitogen_get_stack: {}, register: out} - {mitogen_get_stack: {}, register: out}
- assert_equal: - assert_equal:
left: out.result[0].method left: out.result[0].method
@ -47,3 +53,5 @@
- assert_equal: - assert_equal:
left: out.result[1].method left: out.result[1].method
right: "ssh" right: "ssh"
tags:
- mitogen_only

@ -0,0 +1 @@
../integration/_mitogen_only.yml

@ -6,8 +6,7 @@
- name: regression/issue_591__setuptools_cwd_crash.yml - name: regression/issue_591__setuptools_cwd_crash.yml
hosts: test-targets hosts: test-targets
tasks: tasks:
- meta: end_play - include_tasks: _mitogen_only.yml
when: not is_mitogen
- custom_python_run_script: - custom_python_run_script:
script: | script: |
@ -25,3 +24,4 @@
self._connection.get_chain().call(os.getcwd) self._connection.get_chain().call(os.getcwd)
tags: tags:
- issue_591 - issue_591
- mitogen_only

@ -8,6 +8,7 @@
vars: vars:
mitogen_ssh_compression: false mitogen_ssh_compression: false
tasks: tasks:
- include_tasks: _mitogen_only.yml
- block: - block:
- name: Create /tmp/512mb.zero - name: Create /tmp/512mb.zero
shell: | shell: |
@ -31,7 +32,6 @@
become: false become: false
delegate_to: localhost delegate_to: localhost
run_once: true run_once: true
when:
- is_mitogen
tags: tags:
- issue_615 - issue_615
- mitogen_only

@ -3,7 +3,7 @@
tasks: tasks:
- set_fact: - set_fact:
content: "{% for x in range(126977) %}x{% endfor %}" content: "{% for x in range(126977) %}x{% endfor %}"
- include: _file_service_loop.yml - include_tasks: _file_service_loop.yml
with_sequence: start=1 end=100 with_sequence: start=1 end=100
tags: tags:
- resource_intensive - resource_intensive

@ -1,6 +1,6 @@
#!/usr/bin/env ansible-playbook #!/usr/bin/env ansible-playbook
- include: _container_create.yml - include_playbook: _container_create.yml
- include: _container_setup.yml - include_playbook: _container_setup.yml
- include: _user_accounts.yml - include_playbook: _user_accounts.yml
- include: _container_finalize.yml - include_playbook: _container_finalize.yml

Loading…
Cancel
Save