From 0af057e365053b0ad4d937d910512e073ac8baae Mon Sep 17 00:00:00 2001 From: Alex Willmer Date: Fri, 12 Nov 2021 23:28:16 +0000 Subject: [PATCH 1/2] ci: Convert host group names from kebab-case to snake_case Ansible 2.* and higher emit warnings about snake case, and it may be causing tests to get skipped or behave differently. --- .ci/ansible_tests.py | 2 +- tests/ansible/bench/file_transfer.yml | 2 +- tests/ansible/bench/includes.yml | 2 +- .../ansible/hosts/connection_delegation.hosts | 4 ++-- tests/ansible/hosts/default.hosts | 2 +- ...-containers.yml => osa_all_containers.yml} | 0 tests/ansible/hosts/k3.hosts | 16 +++++++-------- tests/ansible/hosts/localhost.hosts | 20 +++++++++---------- tests/ansible/hosts/osa-containers | 2 +- tests/ansible/integration/action/copy.yml | 2 +- .../integration/action/fixup_perms2__copy.yml | 2 +- .../action/low_level_execute_command.yml | 2 +- .../integration/action/make_tmp_path.yml | 2 +- .../integration/action/remote_expand_user.yml | 2 +- .../integration/action/remote_file_exists.yml | 2 +- .../integration/action/remove_tmp_path.yml | 2 +- .../integration/action/synchronize.yml | 2 +- .../integration/action/transfer_data.yml | 2 +- .../integration/async/multiple_items_loop.yml | 2 +- .../async/result_binary_producing_json.yml | 2 +- .../async/result_binary_producing_junk.yml | 2 +- .../async/result_shell_echo_hi.yml | 2 +- .../integration/async/runner_new_process.yml | 2 +- .../integration/async/runner_one_job.yml | 2 +- .../async/runner_timeout_then_polling.yml | 2 +- .../async/runner_two_simultaneous_jobs.yml | 2 +- .../async/runner_with_polling_and_timeout.yml | 2 +- .../integration/become/su_password.yml | 2 +- .../integration/become/sudo_flags_failure.yml | 2 +- .../integration/become/sudo_nonexistent.yml | 2 +- .../integration/become/sudo_nopassword.yml | 2 +- .../integration/become/sudo_password.yml | 2 +- .../integration/become/sudo_requiretty.yml | 2 +- .../connection/_disconnect_during_module.yml | 2 +- .../connection/disconnect_during_module.yml | 2 +- .../disconnect_resets_connection.yml | 2 +- .../integration/connection/exec_command.yml | 2 +- .../integration/connection/home_dir.yml | 2 +- .../integration/connection/put_large_file.yml | 2 +- .../integration/connection/put_small_file.yml | 2 +- .../ansible/integration/connection/reset.yml | 2 +- .../integration/connection/reset_become.yml | 2 +- .../delegate_to_template.yml | 4 ++-- .../connection_loader/local_blemished.yml | 2 +- .../paramiko_unblemished.yml | 2 +- .../connection_loader/ssh_blemished.yml | 2 +- .../context_service/disconnect_cleanup.yml | 2 +- .../context_service/lru_one_target.yml | 2 +- .../context_service/reconnection.yml | 2 +- .../context_service/remote_name.yml | 2 +- .../integration/glibc_caches/resolv_conf.yml | 2 +- .../ansible_2_8_tests.yml | 2 +- .../interpreter_discovery/complex_args.yml | 2 +- .../integration/local/cwd_preserved.yml | 2 +- .../module_utils/adjacent_to_playbook.yml | 2 +- .../module_utils/adjacent_to_role.yml | 2 +- .../module_utils/from_config_path.yml | 2 +- .../module_utils/from_config_path_pkg.yml | 2 +- .../module_utils/overrides_builtin.yml | 2 +- .../playbook_semantics/become_flags.yml | 4 ++-- .../playbook_semantics/delegate_to.yml | 2 +- .../playbook_semantics/environment.yml | 2 +- .../playbook_semantics/with_items.yml | 2 +- .../process/unix_socket_cleanup.yml | 4 ++-- tests/ansible/integration/runner/atexit.yml | 2 +- .../runner/builtin_command_module.yml | 2 +- .../runner/crashy_new_style_module.yml | 2 +- .../runner/custom_bash_hashbang_argument.yml | 2 +- .../runner/custom_bash_old_style_module.yml | 2 +- .../runner/custom_bash_want_json_module.yml | 2 +- .../runner/custom_binary_producing_json.yml | 2 +- .../runner/custom_binary_producing_junk.yml | 4 ++-- .../runner/custom_binary_single_null.yml | 4 ++-- .../runner/custom_perl_json_args_module.yml | 2 +- .../runner/custom_perl_want_json_module.yml | 2 +- .../runner/custom_python_json_args_module.yml | 2 +- ...m_python_new_style_missing_interpreter.yml | 2 +- .../runner/custom_python_new_style_module.yml | 2 +- .../custom_python_prehistoric_module.yml | 2 +- .../runner/custom_python_want_json_module.yml | 2 +- .../runner/custom_script_interpreter.yml | 2 +- .../runner/environment_isolation.yml | 2 +- .../integration/runner/etc_environment.yml | 2 +- .../integration/runner/forking_active.yml | 2 +- .../runner/forking_correct_parent.yml | 2 +- .../integration/runner/forking_inactive.yml | 2 +- .../integration/runner/missing_module.yml | 4 ++-- tests/ansible/integration/ssh/config.yml | 2 +- tests/ansible/integration/ssh/timeouts.yml | 4 ++-- tests/ansible/integration/ssh/variables.yml | 18 ++++++++--------- .../strategy/_mixed_mitogen_vanilla.yml | 6 +++--- .../strategy/_mixed_vanilla_mitogen.yml | 6 +++--- .../strategy/mixed_vanilla_mitogen.yml | 2 +- .../integration/stub_connections/kubectl.yml | 2 +- .../integration/stub_connections/lxc.yml | 2 +- .../integration/stub_connections/lxd.yml | 2 +- .../stub_connections/mitogen_doas.yml | 2 +- .../stub_connections/mitogen_sudo.yml | 2 +- .../stub_connections/setns_lxc.yml | 2 +- .../stub_connections/setns_lxd.yml | 2 +- ..._109__target_has_old_ansible_installed.yml | 2 +- .../issue_113__duplicate_module_imports.yml | 2 +- .../issue_118__script_not_marked_exec.yml | 2 +- .../issue_122__environment_difference.yml | 2 +- .../regression/issue_140__thread_pileup.yml | 2 +- ...ue_152__local_action_wrong_interpreter.yml | 2 +- .../issue_152__virtualenv_python_fails.yml | 2 +- .../issue_154__module_state_leaks.yml | 2 +- .../issue_177__copy_module_failing.yml | 2 +- ...32_ansiblemoduleerror_first_occurrence.yml | 2 +- .../regression/issue_558_unarchive_failed.yml | 2 +- .../issue_590__sys_modules_crap.yml | 2 +- .../issue_591__setuptools_cwd_crash.yml | 2 +- tests/ansible/setup/report.yml | 2 +- 114 files changed, 149 insertions(+), 149 deletions(-) rename tests/ansible/hosts/group_vars/{osa-all-containers.yml => osa_all_containers.yml} (100%) diff --git a/.ci/ansible_tests.py b/.ci/ansible_tests.py index 665e2c604..6a3fb3866 100755 --- a/.ci/ansible_tests.py +++ b/.ci/ansible_tests.py @@ -47,7 +47,7 @@ def pause_if_interactive(): inventory_path = os.path.join(HOSTS_DIR, 'target') with open(inventory_path, 'w') as fp: - fp.write('[test-targets]\n') + fp.write('[test_targets]\n') fp.writelines( "%(name)s " "ansible_host=%(hostname)s " diff --git a/tests/ansible/bench/file_transfer.yml b/tests/ansible/bench/file_transfer.yml index f6702f587..e5d220ed9 100644 --- a/tests/ansible/bench/file_transfer.yml +++ b/tests/ansible/bench/file_transfer.yml @@ -1,6 +1,6 @@ - name: bench/file_transfer.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: diff --git a/tests/ansible/bench/includes.yml b/tests/ansible/bench/includes.yml index 960798747..8d6f884d9 100644 --- a/tests/ansible/bench/includes.yml +++ b/tests/ansible/bench/includes.yml @@ -1,4 +1,4 @@ -- hosts: test-targets +- hosts: test_targets tasks: - include_tasks: _includes.yml with_sequence: start=1 end=1000 diff --git a/tests/ansible/hosts/connection_delegation.hosts b/tests/ansible/hosts/connection_delegation.hosts index a22bd5df9..86d8e3449 100644 --- a/tests/ansible/hosts/connection_delegation.hosts +++ b/tests/ansible/hosts/connection_delegation.hosts @@ -23,14 +23,14 @@ cd-newuser-normal-normal mitogen_via=cd-normal ansible_user=newuser-normal-norma cd-newuser-doas-normal mitogen_via=cd-normal ansible_connection=mitogen_doas ansible_user=newuser-doas-normal-user -[connection-delegation-test] +[connection_delegation_test] cd-bastion cd-rack11 mitogen_via=ssh-user@cd-bastion cd-rack11a mitogen_via=root@cd-rack11 cd-rack11a-docker mitogen_via=docker-admin@cd-rack11a ansible_connection=docker -[connection-delegation-cycle] +[connection_delegation_cycle] # Create cycle with Docker container. cdc-bastion mitogen_via=cdc-rack11a-docker cdc-rack11 mitogen_via=ssh-user@cdc-bastion diff --git a/tests/ansible/hosts/default.hosts b/tests/ansible/hosts/default.hosts index d40c3dd0a..4f4685eff 100644 --- a/tests/ansible/hosts/default.hosts +++ b/tests/ansible/hosts/default.hosts @@ -5,5 +5,5 @@ # fixed ansible.cfg remote_user setting to test against. target ansible_host=localhost ansible_user="{{lookup('env', 'USER')}}" -[test-targets] +[test_targets] target diff --git a/tests/ansible/hosts/group_vars/osa-all-containers.yml b/tests/ansible/hosts/group_vars/osa_all_containers.yml similarity index 100% rename from tests/ansible/hosts/group_vars/osa-all-containers.yml rename to tests/ansible/hosts/group_vars/osa_all_containers.yml diff --git a/tests/ansible/hosts/k3.hosts b/tests/ansible/hosts/k3.hosts index 34e1ff958..2829def22 100644 --- a/tests/ansible/hosts/k3.hosts +++ b/tests/ansible/hosts/k3.hosts @@ -3,26 +3,26 @@ # Used for manual testing. k3 -[k3-x10] +[k3_x10] k3-[01:10] -[k3-x20] +[k3_x20] k3-[01:20] -[k3-x50] +[k3_x50] k3-[01:50] -[k3-x100] +[k3_x100] k3-[001:100] -[k3-x200] +[k3_x200] k3-[001:200] -[k3-x300] +[k3_x300] k3-[001:300] -[k3-x400] +[k3_x400] k3-[001:400] -[k3-x500] +[k3_x500] k3-[001:500] diff --git a/tests/ansible/hosts/localhost.hosts b/tests/ansible/hosts/localhost.hosts index 41af412e5..a22a65da5 100644 --- a/tests/ansible/hosts/localhost.hosts +++ b/tests/ansible/hosts/localhost.hosts @@ -5,32 +5,32 @@ # behaviour. # This is only used for manual testing. -[localhost-x10] +[localhost_x10] localhost-[001:010] -[localhost-x20] +[localhost_x20] localhost-[001:020] -[localhost-x30] +[localhost_x30] localhost-[001:030] -[localhost-x40] +[localhost_x40] localhost-[001:040] -[localhost-x50] +[localhost_x50] localhost-[001:050] -[localhost-x60] +[localhost_x60] localhost-[001:060] -[localhost-x70] +[localhost_x70] localhost-[001:070] -[localhost-x80] +[localhost_x80] localhost-[001:080] -[localhost-x90] +[localhost_x90] localhost-[001:090] -[localhost-x100] +[localhost_x100] localhost-[001:100] diff --git a/tests/ansible/hosts/osa-containers b/tests/ansible/hosts/osa-containers index 7ff2c2b67..f9ace11b0 100644 --- a/tests/ansible/hosts/osa-containers +++ b/tests/ansible/hosts/osa-containers @@ -3,7 +3,7 @@ # Patterned after openstack-ansible/all_containers.yml osa-host-machine ansible_host=172.29.236.100 -[osa-all-containers] +[osa_all_containers] osa-container-1 container_tech=lxc osa-container-2 container_tech=lxc osa-container-3 container_tech=lxc diff --git a/tests/ansible/integration/action/copy.yml b/tests/ansible/integration/action/copy.yml index 611ff3f25..f6d8e1cf4 100644 --- a/tests/ansible/integration/action/copy.yml +++ b/tests/ansible/integration/action/copy.yml @@ -1,7 +1,7 @@ # Verify copy module for small and large files, and inline content. - name: integration/action/copy.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: - copy: diff --git a/tests/ansible/integration/action/fixup_perms2__copy.yml b/tests/ansible/integration/action/fixup_perms2__copy.yml index 1ba19e6fc..30ec29e88 100644 --- a/tests/ansible/integration/action/fixup_perms2__copy.yml +++ b/tests/ansible/integration/action/fixup_perms2__copy.yml @@ -4,7 +4,7 @@ # regardless, we're testing that no execute bit is set here so either check is ok - name: integration/action/fixup_perms2__copy.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: # diff --git a/tests/ansible/integration/action/low_level_execute_command.yml b/tests/ansible/integration/action/low_level_execute_command.yml index 7f91bdf89..7acd42052 100644 --- a/tests/ansible/integration/action/low_level_execute_command.yml +++ b/tests/ansible/integration/action/low_level_execute_command.yml @@ -1,7 +1,7 @@ # Verify the behaviour of _low_level_execute_command(). - name: integration/action/low_level_execute_command.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: diff --git a/tests/ansible/integration/action/make_tmp_path.yml b/tests/ansible/integration/action/make_tmp_path.yml index bfebeffd6..2357af337 100644 --- a/tests/ansible/integration/action/make_tmp_path.yml +++ b/tests/ansible/integration/action/make_tmp_path.yml @@ -8,7 +8,7 @@ # https://github.com/dw/mitogen/issues/301 - name: integration/action/make_tmp_path.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: - meta: end_play diff --git a/tests/ansible/integration/action/remote_expand_user.yml b/tests/ansible/integration/action/remote_expand_user.yml index 8e31f6579..1f40b1137 100644 --- a/tests/ansible/integration/action/remote_expand_user.yml +++ b/tests/ansible/integration/action/remote_expand_user.yml @@ -2,7 +2,7 @@ # $HOME expansion. - name: integration/action/remote_expand_user.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: - name: "Find out root's homedir." diff --git a/tests/ansible/integration/action/remote_file_exists.yml b/tests/ansible/integration/action/remote_file_exists.yml index 2d206930e..7b616b43b 100644 --- a/tests/ansible/integration/action/remote_file_exists.yml +++ b/tests/ansible/integration/action/remote_file_exists.yml @@ -1,6 +1,6 @@ - name: integration/action/remote_file_exists.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: diff --git a/tests/ansible/integration/action/remove_tmp_path.yml b/tests/ansible/integration/action/remove_tmp_path.yml index 19ae22e38..91f09b7d0 100644 --- a/tests/ansible/integration/action/remove_tmp_path.yml +++ b/tests/ansible/integration/action/remove_tmp_path.yml @@ -3,7 +3,7 @@ # # - name: integration/action/remove_tmp_path.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: # diff --git a/tests/ansible/integration/action/synchronize.yml b/tests/ansible/integration/action/synchronize.yml index a6cd277ea..6423608b0 100644 --- a/tests/ansible/integration/action/synchronize.yml +++ b/tests/ansible/integration/action/synchronize.yml @@ -1,7 +1,7 @@ # Verify basic operation of the synchronize module. - name: integration/action/synchronize.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true vars: ansible_user: mitogen__has_sudo_pubkey diff --git a/tests/ansible/integration/action/transfer_data.yml b/tests/ansible/integration/action/transfer_data.yml index e0f42d0e1..67a613c54 100644 --- a/tests/ansible/integration/action/transfer_data.yml +++ b/tests/ansible/integration/action/transfer_data.yml @@ -1,6 +1,6 @@ - name: integration/action/transfer_data.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: diff --git a/tests/ansible/integration/async/multiple_items_loop.yml b/tests/ansible/integration/async/multiple_items_loop.yml index 24d43083f..89f3dd601 100644 --- a/tests/ansible/integration/async/multiple_items_loop.yml +++ b/tests/ansible/integration/async/multiple_items_loop.yml @@ -1,7 +1,7 @@ # issue #414: verify behaviour of async tasks created in a loop. - name: integration/async/multiple_items_loop.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: diff --git a/tests/ansible/integration/async/result_binary_producing_json.yml b/tests/ansible/integration/async/result_binary_producing_json.yml index b05b24bf5..d1b8b22ba 100644 --- a/tests/ansible/integration/async/result_binary_producing_json.yml +++ b/tests/ansible/integration/async/result_binary_producing_json.yml @@ -1,7 +1,7 @@ - name: integration/async/result_binary_producing_json.yml gather_facts: true - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: diff --git a/tests/ansible/integration/async/result_binary_producing_junk.yml b/tests/ansible/integration/async/result_binary_producing_junk.yml index afdf0c2f7..69209efc6 100644 --- a/tests/ansible/integration/async/result_binary_producing_junk.yml +++ b/tests/ansible/integration/async/result_binary_producing_junk.yml @@ -1,7 +1,7 @@ - name: integration/async/result_binary_producing_junk.yml gather_facts: true - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: diff --git a/tests/ansible/integration/async/result_shell_echo_hi.yml b/tests/ansible/integration/async/result_shell_echo_hi.yml index c0cb283cb..7e172702c 100644 --- a/tests/ansible/integration/async/result_shell_echo_hi.yml +++ b/tests/ansible/integration/async/result_shell_echo_hi.yml @@ -1,7 +1,7 @@ - name: integration/async/result_shell_echo_hi.yml gather_facts: true - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: diff --git a/tests/ansible/integration/async/runner_new_process.yml b/tests/ansible/integration/async/runner_new_process.yml index fbc7261fc..717400962 100644 --- a/tests/ansible/integration/async/runner_new_process.yml +++ b/tests/ansible/integration/async/runner_new_process.yml @@ -1,7 +1,7 @@ # Verify async jobs run in a new process. - name: integration/async/runner_new_process.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: diff --git a/tests/ansible/integration/async/runner_one_job.yml b/tests/ansible/integration/async/runner_one_job.yml index cf33ae56a..e9f7f63e7 100644 --- a/tests/ansible/integration/async/runner_one_job.yml +++ b/tests/ansible/integration/async/runner_one_job.yml @@ -2,7 +2,7 @@ # fields. - name: integration/async/runner_one_job.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: diff --git a/tests/ansible/integration/async/runner_timeout_then_polling.yml b/tests/ansible/integration/async/runner_timeout_then_polling.yml index 6fc46ba75..b6049713a 100644 --- a/tests/ansible/integration/async/runner_timeout_then_polling.yml +++ b/tests/ansible/integration/async/runner_timeout_then_polling.yml @@ -1,7 +1,7 @@ # Verify 'async: ' functions as desired. - name: integration/async/runner_timeout_then_polling.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: diff --git a/tests/ansible/integration/async/runner_two_simultaneous_jobs.yml b/tests/ansible/integration/async/runner_two_simultaneous_jobs.yml index af102f190..e7fc5bc7a 100644 --- a/tests/ansible/integration/async/runner_two_simultaneous_jobs.yml +++ b/tests/ansible/integration/async/runner_two_simultaneous_jobs.yml @@ -1,6 +1,6 @@ - name: integration/async/runner_two_simultaneous_jobs.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: diff --git a/tests/ansible/integration/async/runner_with_polling_and_timeout.yml b/tests/ansible/integration/async/runner_with_polling_and_timeout.yml index a5cbabef6..6d9b998b1 100644 --- a/tests/ansible/integration/async/runner_with_polling_and_timeout.yml +++ b/tests/ansible/integration/async/runner_with_polling_and_timeout.yml @@ -1,7 +1,7 @@ # Verify 'async: ' functions as desired. - name: integration/async/runner_with_polling_and_timeout.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: diff --git a/tests/ansible/integration/become/su_password.yml b/tests/ansible/integration/become/su_password.yml index 7bd6db5aa..f9390100b 100644 --- a/tests/ansible/integration/become/su_password.yml +++ b/tests/ansible/integration/become/su_password.yml @@ -2,7 +2,7 @@ # Ansible can't handle this on OS X. I don't care why. - name: integration/become/su_password.yml - hosts: test-targets + hosts: test_targets become_method: su any_errors_fatal: true tasks: diff --git a/tests/ansible/integration/become/sudo_flags_failure.yml b/tests/ansible/integration/become/sudo_flags_failure.yml index fdbb712c6..f3e03f452 100644 --- a/tests/ansible/integration/become/sudo_flags_failure.yml +++ b/tests/ansible/integration/become/sudo_flags_failure.yml @@ -1,5 +1,5 @@ - name: integration/become/sudo_flags_failure.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: diff --git a/tests/ansible/integration/become/sudo_nonexistent.yml b/tests/ansible/integration/become/sudo_nonexistent.yml index bc3de7b81..cec494ba7 100644 --- a/tests/ansible/integration/become/sudo_nonexistent.yml +++ b/tests/ansible/integration/become/sudo_nonexistent.yml @@ -1,5 +1,5 @@ - name: integration/become/sudo_nonexistent.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: diff --git a/tests/ansible/integration/become/sudo_nopassword.yml b/tests/ansible/integration/become/sudo_nopassword.yml index 110c95b43..b9738699b 100644 --- a/tests/ansible/integration/become/sudo_nopassword.yml +++ b/tests/ansible/integration/become/sudo_nopassword.yml @@ -1,7 +1,7 @@ # Verify passwordless sudo behaviour in various cases. - name: integration/become/sudo_nopassword.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: diff --git a/tests/ansible/integration/become/sudo_password.yml b/tests/ansible/integration/become/sudo_password.yml index a0a1dec9d..6e81449fe 100644 --- a/tests/ansible/integration/become/sudo_password.yml +++ b/tests/ansible/integration/become/sudo_password.yml @@ -1,7 +1,7 @@ # Verify passwordful sudo behaviour - name: integration/become/sudo_password.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: diff --git a/tests/ansible/integration/become/sudo_requiretty.yml b/tests/ansible/integration/become/sudo_requiretty.yml index 0bdfaa26e..4972a1391 100644 --- a/tests/ansible/integration/become/sudo_requiretty.yml +++ b/tests/ansible/integration/become/sudo_requiretty.yml @@ -1,7 +1,7 @@ # Verify requiretty support - name: integration/become/sudo_requiretty.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: diff --git a/tests/ansible/integration/connection/_disconnect_during_module.yml b/tests/ansible/integration/connection/_disconnect_during_module.yml index 6bd8cd507..4675abb13 100644 --- a/tests/ansible/integration/connection/_disconnect_during_module.yml +++ b/tests/ansible/integration/connection/_disconnect_during_module.yml @@ -2,7 +2,7 @@ --- - name: integration/connection/_disconnect_during_module.yml - hosts: test-targets + hosts: test_targets gather_facts: no any_errors_fatal: false tasks: diff --git a/tests/ansible/integration/connection/disconnect_during_module.yml b/tests/ansible/integration/connection/disconnect_during_module.yml index 1c7b544a2..a09505066 100644 --- a/tests/ansible/integration/connection/disconnect_during_module.yml +++ b/tests/ansible/integration/connection/disconnect_during_module.yml @@ -2,7 +2,7 @@ --- - name: integration/connection/disconnect_during_module.yml - hosts: test-targets + hosts: test_targets gather_facts: no any_errors_fatal: false tasks: diff --git a/tests/ansible/integration/connection/disconnect_resets_connection.yml b/tests/ansible/integration/connection/disconnect_resets_connection.yml index 3a6f712a3..ffb48c00e 100644 --- a/tests/ansible/integration/connection/disconnect_resets_connection.yml +++ b/tests/ansible/integration/connection/disconnect_resets_connection.yml @@ -10,7 +10,7 @@ --- - name: integration/connection/disconnect_resets_connection.yml - hosts: test-targets + hosts: test_targets gather_facts: no any_errors_fatal: true tasks: diff --git a/tests/ansible/integration/connection/exec_command.yml b/tests/ansible/integration/connection/exec_command.yml index 125def1bb..714276769 100644 --- a/tests/ansible/integration/connection/exec_command.yml +++ b/tests/ansible/integration/connection/exec_command.yml @@ -2,7 +2,7 @@ --- - name: integration/connection/exec_command.yml - hosts: test-targets + hosts: test_targets gather_facts: no any_errors_fatal: true tasks: diff --git a/tests/ansible/integration/connection/home_dir.yml b/tests/ansible/integration/connection/home_dir.yml index 1dbaa5d3b..6f4ae3198 100644 --- a/tests/ansible/integration/connection/home_dir.yml +++ b/tests/ansible/integration/connection/home_dir.yml @@ -1,7 +1,7 @@ # Verify the value of the Connection.homedir attribute is as expected. - name: integration/connection/home_dir.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: - name: "Find out root's homedir." diff --git a/tests/ansible/integration/connection/put_large_file.yml b/tests/ansible/integration/connection/put_large_file.yml index 90a13999c..eb3acbc72 100644 --- a/tests/ansible/integration/connection/put_large_file.yml +++ b/tests/ansible/integration/connection/put_large_file.yml @@ -2,7 +2,7 @@ --- - name: integration/connection/put_large_file.yml - hosts: test-targets + hosts: test_targets gather_facts: no any_errors_fatal: true vars: diff --git a/tests/ansible/integration/connection/put_small_file.yml b/tests/ansible/integration/connection/put_small_file.yml index 49be87a9d..0a86742f4 100644 --- a/tests/ansible/integration/connection/put_small_file.yml +++ b/tests/ansible/integration/connection/put_small_file.yml @@ -2,7 +2,7 @@ --- - name: integration/connection/put_small_file.yml - hosts: test-targets + hosts: test_targets gather_facts: no any_errors_fatal: true vars: diff --git a/tests/ansible/integration/connection/reset.yml b/tests/ansible/integration/connection/reset.yml index ccad928ec..9d2b64303 100644 --- a/tests/ansible/integration/connection/reset.yml +++ b/tests/ansible/integration/connection/reset.yml @@ -4,7 +4,7 @@ --- - name: integration/connection/reset.yml - hosts: test-targets + hosts: test_targets tasks: - meta: end_play when: not is_mitogen diff --git a/tests/ansible/integration/connection/reset_become.yml b/tests/ansible/integration/connection/reset_become.yml index fe29dfedd..568687f8c 100644 --- a/tests/ansible/integration/connection/reset_become.yml +++ b/tests/ansible/integration/connection/reset_become.yml @@ -1,7 +1,7 @@ # issue #633: Connection.reset() should ignore "become", and apply to the login # account. -- hosts: test-targets +- hosts: test_targets become: true gather_facts: false tasks: diff --git a/tests/ansible/integration/connection_delegation/delegate_to_template.yml b/tests/ansible/integration/connection_delegation/delegate_to_template.yml index 8e048fa45..cbdf28160 100644 --- a/tests/ansible/integration/connection_delegation/delegate_to_template.yml +++ b/tests/ansible/integration/connection_delegation/delegate_to_template.yml @@ -1,6 +1,6 @@ # issue #340: Ensure templated delegate_to field works. # -# Here we delegate from "test-targets" group to a templated "{{physical_host}}" +# Here we delegate from "test_targets" group to a templated "{{physical_host}}" # variable, which contains "cd-normal-alias", which has a # "mitogen_via=cd-alias", which in turn has an "ansible_host="alias-host". # @@ -12,7 +12,7 @@ vars: physical_host: "cd-normal-alias" physical_hosts: ["cd-normal-alias", "cd-normal-normal"] - hosts: test-targets + hosts: test_targets gather_facts: no any_errors_fatal: true tasks: diff --git a/tests/ansible/integration/connection_loader/local_blemished.yml b/tests/ansible/integration/connection_loader/local_blemished.yml index 85224dbff..fba8166d0 100644 --- a/tests/ansible/integration/connection_loader/local_blemished.yml +++ b/tests/ansible/integration/connection_loader/local_blemished.yml @@ -1,7 +1,7 @@ # Ensure 'local' connections are grabbed. - name: integration/connection_loader/local_blemished.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: - determine_strategy: diff --git a/tests/ansible/integration/connection_loader/paramiko_unblemished.yml b/tests/ansible/integration/connection_loader/paramiko_unblemished.yml index 1bc5e2f63..0527575f4 100644 --- a/tests/ansible/integration/connection_loader/paramiko_unblemished.yml +++ b/tests/ansible/integration/connection_loader/paramiko_unblemished.yml @@ -2,7 +2,7 @@ --- - name: integration/connection_loader/paramiko_unblemished.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: - debug: diff --git a/tests/ansible/integration/connection_loader/ssh_blemished.yml b/tests/ansible/integration/connection_loader/ssh_blemished.yml index 58d35cee3..45339032a 100644 --- a/tests/ansible/integration/connection_loader/ssh_blemished.yml +++ b/tests/ansible/integration/connection_loader/ssh_blemished.yml @@ -1,7 +1,7 @@ # Ensure 'ssh' connections are grabbed. - name: integration/connection_loader__ssh_blemished.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: - determine_strategy: diff --git a/tests/ansible/integration/context_service/disconnect_cleanup.yml b/tests/ansible/integration/context_service/disconnect_cleanup.yml index 4f846535c..7356aab12 100644 --- a/tests/ansible/integration/context_service/disconnect_cleanup.yml +++ b/tests/ansible/integration/context_service/disconnect_cleanup.yml @@ -2,7 +2,7 @@ # state of dependent contexts (e.g. sudo, connection delegation, ..). - name: integration/context_service/disconnect_cleanup.yml - hosts: test-targets[0] + hosts: test_targets[0] any_errors_fatal: true tasks: - meta: end_play diff --git a/tests/ansible/integration/context_service/lru_one_target.yml b/tests/ansible/integration/context_service/lru_one_target.yml index 2d6dc6cfb..d34f8302e 100644 --- a/tests/ansible/integration/context_service/lru_one_target.yml +++ b/tests/ansible/integration/context_service/lru_one_target.yml @@ -1,7 +1,7 @@ # Verify a maximum number of contexts are possible on one machine. - name: integration/context_service/lru_one_target.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true vars: max_interps: "{{lookup('env', 'MITOGEN_MAX_INTERPRETERS')}}" diff --git a/tests/ansible/integration/context_service/reconnection.yml b/tests/ansible/integration/context_service/reconnection.yml index 2d7dbacf8..2a51355cd 100644 --- a/tests/ansible/integration/context_service/reconnection.yml +++ b/tests/ansible/integration/context_service/reconnection.yml @@ -2,7 +2,7 @@ # cleanup of dependent (via=) contexts. - name: integration/context_service/reconnection.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: - mitogen_shutdown_all: diff --git a/tests/ansible/integration/context_service/remote_name.yml b/tests/ansible/integration/context_service/remote_name.yml index cce209e46..4ef975a78 100644 --- a/tests/ansible/integration/context_service/remote_name.yml +++ b/tests/ansible/integration/context_service/remote_name.yml @@ -1,7 +1,7 @@ # issue #581: ensure mitogen_mask_remote_name is respected. - name: integration/context_service/remote_name.yml - hosts: test-targets[0] + hosts: test_targets[0] any_errors_fatal: true tasks: - meta: end_play diff --git a/tests/ansible/integration/glibc_caches/resolv_conf.yml b/tests/ansible/integration/glibc_caches/resolv_conf.yml index e2894e58e..e9bbddb57 100644 --- a/tests/ansible/integration/glibc_caches/resolv_conf.yml +++ b/tests/ansible/integration/glibc_caches/resolv_conf.yml @@ -4,7 +4,7 @@ - name: integration/glibc_caches/resolv_conf.yml gather_facts: true become: true - hosts: test-targets + hosts: test_targets vars: ansible_become_pass: has_sudo_pubkey_password tasks: diff --git a/tests/ansible/integration/interpreter_discovery/ansible_2_8_tests.yml b/tests/ansible/integration/interpreter_discovery/ansible_2_8_tests.yml index 838b2d86c..f3ed4ae9d 100644 --- a/tests/ansible/integration/interpreter_discovery/ansible_2_8_tests.yml +++ b/tests/ansible/integration/interpreter_discovery/ansible_2_8_tests.yml @@ -2,7 +2,7 @@ --- - name: integration/interpreter_discovery/ansible_2_8_tests.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true gather_facts: true tasks: diff --git a/tests/ansible/integration/interpreter_discovery/complex_args.yml b/tests/ansible/integration/interpreter_discovery/complex_args.yml index ca35a4026..b52ce304d 100644 --- a/tests/ansible/integration/interpreter_discovery/complex_args.yml +++ b/tests/ansible/integration/interpreter_discovery/complex_args.yml @@ -2,7 +2,7 @@ --- - name: integration/interpreter_discovery/complex_args.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true gather_facts: true tasks: diff --git a/tests/ansible/integration/local/cwd_preserved.yml b/tests/ansible/integration/local/cwd_preserved.yml index 24a34ba8a..1b00cba37 100644 --- a/tests/ansible/integration/local/cwd_preserved.yml +++ b/tests/ansible/integration/local/cwd_preserved.yml @@ -6,7 +6,7 @@ - name: integration/local/cwd_preserved.yml any_errors_fatal: true - hosts: test-targets + hosts: test_targets tasks: - connection: local command: pwd diff --git a/tests/ansible/integration/module_utils/adjacent_to_playbook.yml b/tests/ansible/integration/module_utils/adjacent_to_playbook.yml index edd65db7d..745a28077 100644 --- a/tests/ansible/integration/module_utils/adjacent_to_playbook.yml +++ b/tests/ansible/integration/module_utils/adjacent_to_playbook.yml @@ -2,7 +2,7 @@ # external1 is loaded from integration/module_utils/module_utils/.. - name: integration/module_utils/adjacent_to_playbook.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: diff --git a/tests/ansible/integration/module_utils/adjacent_to_role.yml b/tests/ansible/integration/module_utils/adjacent_to_role.yml index 4430c2d96..15fe6ec6e 100644 --- a/tests/ansible/integration/module_utils/adjacent_to_role.yml +++ b/tests/ansible/integration/module_utils/adjacent_to_role.yml @@ -2,7 +2,7 @@ # external1 is loaded from integration/module_utils/roles/modrole/module_utils/.. - name: integration/module_utils/adjacent_to_playbook.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true roles: - modrole diff --git a/tests/ansible/integration/module_utils/from_config_path.yml b/tests/ansible/integration/module_utils/from_config_path.yml index 0fb0f3ead..5ce9e409b 100644 --- a/tests/ansible/integration/module_utils/from_config_path.yml +++ b/tests/ansible/integration/module_utils/from_config_path.yml @@ -1,7 +1,7 @@ # external1 and external2 are loaded from config path. - name: integration/module_utils/from_config_path.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: diff --git a/tests/ansible/integration/module_utils/from_config_path_pkg.yml b/tests/ansible/integration/module_utils/from_config_path_pkg.yml index 3453cf293..209ab608b 100644 --- a/tests/ansible/integration/module_utils/from_config_path_pkg.yml +++ b/tests/ansible/integration/module_utils/from_config_path_pkg.yml @@ -1,7 +1,7 @@ # external1 and external2 are loaded from config path. - name: integration/module_utils/from_config_path.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: diff --git a/tests/ansible/integration/module_utils/overrides_builtin.yml b/tests/ansible/integration/module_utils/overrides_builtin.yml index 86d883128..daa59e8b8 100644 --- a/tests/ansible/integration/module_utils/overrides_builtin.yml +++ b/tests/ansible/integration/module_utils/overrides_builtin.yml @@ -1,6 +1,6 @@ - name: integration/module_utils/overrides_builtin.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true roles: - overrides_modrole diff --git a/tests/ansible/integration/playbook_semantics/become_flags.yml b/tests/ansible/integration/playbook_semantics/become_flags.yml index ac7626437..6644835bd 100644 --- a/tests/ansible/integration/playbook_semantics/become_flags.yml +++ b/tests/ansible/integration/playbook_semantics/become_flags.yml @@ -3,7 +3,7 @@ # - name: integration/playbook_semantics/become_flags.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: @@ -18,7 +18,7 @@ tags: - become_flags -- hosts: test-targets +- hosts: test_targets any_errors_fatal: true become_flags: -E tasks: diff --git a/tests/ansible/integration/playbook_semantics/delegate_to.yml b/tests/ansible/integration/playbook_semantics/delegate_to.yml index 7536258f8..e02d8fefd 100644 --- a/tests/ansible/integration/playbook_semantics/delegate_to.yml +++ b/tests/ansible/integration/playbook_semantics/delegate_to.yml @@ -1,5 +1,5 @@ - name: integration/playbook_semantics/delegate_to.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: # diff --git a/tests/ansible/integration/playbook_semantics/environment.yml b/tests/ansible/integration/playbook_semantics/environment.yml index 01e8ce04b..2f14add1d 100644 --- a/tests/ansible/integration/playbook_semantics/environment.yml +++ b/tests/ansible/integration/playbook_semantics/environment.yml @@ -1,7 +1,7 @@ # Ensure environment: is preserved during call. - name: integration/playbook_semantics/environment.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: - shell: echo $SOME_ENV diff --git a/tests/ansible/integration/playbook_semantics/with_items.yml b/tests/ansible/integration/playbook_semantics/with_items.yml index 12a92bba5..706e5faf9 100644 --- a/tests/ansible/integration/playbook_semantics/with_items.yml +++ b/tests/ansible/integration/playbook_semantics/with_items.yml @@ -2,7 +2,7 @@ # the correct context. - name: integration/playbook_semantics/with_items.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: diff --git a/tests/ansible/integration/process/unix_socket_cleanup.yml b/tests/ansible/integration/process/unix_socket_cleanup.yml index 6aeac609c..4bedb1292 100644 --- a/tests/ansible/integration/process/unix_socket_cleanup.yml +++ b/tests/ansible/integration/process/unix_socket_cleanup.yml @@ -1,5 +1,5 @@ -- hosts: test-targets[0] +- hosts: test_targets[0] tasks: - mitogen_action_script: script: | @@ -10,7 +10,7 @@ - shell: > ANSIBLE_STRATEGY=mitogen_linear ANSIBLE_SSH_ARGS="" - ansible -m shell -c local -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets + ansible -m shell -c local -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test_targets args: chdir: ../.. register: out diff --git a/tests/ansible/integration/runner/atexit.yml b/tests/ansible/integration/runner/atexit.yml index 9cab0a5d4..ab954be17 100644 --- a/tests/ansible/integration/runner/atexit.yml +++ b/tests/ansible/integration/runner/atexit.yml @@ -3,7 +3,7 @@ # completion. - name: integration/runner/atexit.yml - hosts: test-targets + hosts: test_targets gather_facts: false any_errors_fatal: false vars: diff --git a/tests/ansible/integration/runner/builtin_command_module.yml b/tests/ansible/integration/runner/builtin_command_module.yml index b567bee6d..52e0c7d9c 100644 --- a/tests/ansible/integration/runner/builtin_command_module.yml +++ b/tests/ansible/integration/runner/builtin_command_module.yml @@ -1,6 +1,6 @@ - name: integration/runner/builtin_command_module.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true gather_facts: true tasks: diff --git a/tests/ansible/integration/runner/crashy_new_style_module.yml b/tests/ansible/integration/runner/crashy_new_style_module.yml index 77f45861f..39ee4a1d5 100644 --- a/tests/ansible/integration/runner/crashy_new_style_module.yml +++ b/tests/ansible/integration/runner/crashy_new_style_module.yml @@ -1,7 +1,7 @@ # issue #527: catch exceptions from crashy modules. - name: integration/runner/crashy_new_style_module.yml - hosts: test-targets + hosts: test_targets tasks: - custom_python_run_script: script: kaboom diff --git a/tests/ansible/integration/runner/custom_bash_hashbang_argument.yml b/tests/ansible/integration/runner/custom_bash_hashbang_argument.yml index d2d2281cd..8f4ad16d3 100644 --- a/tests/ansible/integration/runner/custom_bash_hashbang_argument.yml +++ b/tests/ansible/integration/runner/custom_bash_hashbang_argument.yml @@ -1,6 +1,6 @@ # https://github.com/dw/mitogen/issues/291 - name: integration/runner/custom_bash_hashbang_argument.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: diff --git a/tests/ansible/integration/runner/custom_bash_old_style_module.yml b/tests/ansible/integration/runner/custom_bash_old_style_module.yml index 122b8fded..8a2921fd5 100644 --- a/tests/ansible/integration/runner/custom_bash_old_style_module.yml +++ b/tests/ansible/integration/runner/custom_bash_old_style_module.yml @@ -1,5 +1,5 @@ - name: integration/runner/custom_bash_old_style_module.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: diff --git a/tests/ansible/integration/runner/custom_bash_want_json_module.yml b/tests/ansible/integration/runner/custom_bash_want_json_module.yml index b4242e9a3..1dbd88a4f 100644 --- a/tests/ansible/integration/runner/custom_bash_want_json_module.yml +++ b/tests/ansible/integration/runner/custom_bash_want_json_module.yml @@ -1,5 +1,5 @@ - name: integration/runner/custom_bash_want_json_module.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: - custom_bash_want_json_module: diff --git a/tests/ansible/integration/runner/custom_binary_producing_json.yml b/tests/ansible/integration/runner/custom_binary_producing_json.yml index 6dfeefc34..584448069 100644 --- a/tests/ansible/integration/runner/custom_binary_producing_json.yml +++ b/tests/ansible/integration/runner/custom_binary_producing_json.yml @@ -1,5 +1,5 @@ - name: integration/runner/custom_binary_producing_json.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true gather_facts: true tasks: diff --git a/tests/ansible/integration/runner/custom_binary_producing_junk.yml b/tests/ansible/integration/runner/custom_binary_producing_junk.yml index 97fc92fe4..b846e6ee2 100644 --- a/tests/ansible/integration/runner/custom_binary_producing_junk.yml +++ b/tests/ansible/integration/runner/custom_binary_producing_junk.yml @@ -1,5 +1,5 @@ - name: integration/runner/custom_binary_producing_junk.yml - hosts: test-targets + hosts: test_targets gather_facts: true tasks: - block: @@ -23,7 +23,7 @@ - custom_binary_producing_junk -- hosts: test-targets +- hosts: test_targets any_errors_fatal: true tasks: - assert: diff --git a/tests/ansible/integration/runner/custom_binary_single_null.yml b/tests/ansible/integration/runner/custom_binary_single_null.yml index 353cc58db..0aaaf8a8d 100644 --- a/tests/ansible/integration/runner/custom_binary_single_null.yml +++ b/tests/ansible/integration/runner/custom_binary_single_null.yml @@ -1,5 +1,5 @@ - name: integration/runner/custom_binary_single_null.yml - hosts: test-targets + hosts: test_targets tasks: - custom_binary_single_null: foo: true @@ -9,7 +9,7 @@ tags: - custom_binary_single_null -- hosts: test-targets +- hosts: test_targets any_errors_fatal: true tasks: - assert: diff --git a/tests/ansible/integration/runner/custom_perl_json_args_module.yml b/tests/ansible/integration/runner/custom_perl_json_args_module.yml index 6201318ac..67e0833cd 100644 --- a/tests/ansible/integration/runner/custom_perl_json_args_module.yml +++ b/tests/ansible/integration/runner/custom_perl_json_args_module.yml @@ -1,5 +1,5 @@ - name: integration/runner/custom_perl_json_args_module.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: - custom_perl_json_args_module: diff --git a/tests/ansible/integration/runner/custom_perl_want_json_module.yml b/tests/ansible/integration/runner/custom_perl_want_json_module.yml index 9c39b1b68..d68638450 100644 --- a/tests/ansible/integration/runner/custom_perl_want_json_module.yml +++ b/tests/ansible/integration/runner/custom_perl_want_json_module.yml @@ -1,5 +1,5 @@ - name: integration/runner/custom_perl_want_json_module.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: - custom_perl_want_json_module: diff --git a/tests/ansible/integration/runner/custom_python_json_args_module.yml b/tests/ansible/integration/runner/custom_python_json_args_module.yml index 33a03ba02..2ce564ac2 100644 --- a/tests/ansible/integration/runner/custom_python_json_args_module.yml +++ b/tests/ansible/integration/runner/custom_python_json_args_module.yml @@ -1,5 +1,5 @@ - name: integration/runner/custom_python_json_args_module.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: - custom_python_json_args_module: diff --git a/tests/ansible/integration/runner/custom_python_new_style_missing_interpreter.yml b/tests/ansible/integration/runner/custom_python_new_style_missing_interpreter.yml index 1562e307d..a8d9cfa90 100644 --- a/tests/ansible/integration/runner/custom_python_new_style_missing_interpreter.yml +++ b/tests/ansible/integration/runner/custom_python_new_style_missing_interpreter.yml @@ -1,6 +1,6 @@ - name: integration/runner/custom_python_new_style_module.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: - custom_python_new_style_missing_interpreter: diff --git a/tests/ansible/integration/runner/custom_python_new_style_module.yml b/tests/ansible/integration/runner/custom_python_new_style_module.yml index b22fdc14b..d0c547603 100644 --- a/tests/ansible/integration/runner/custom_python_new_style_module.yml +++ b/tests/ansible/integration/runner/custom_python_new_style_module.yml @@ -1,5 +1,5 @@ - name: integration/runner/custom_python_new_style_module.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: # without Mitogen Ansible 2.10 hangs on this play diff --git a/tests/ansible/integration/runner/custom_python_prehistoric_module.yml b/tests/ansible/integration/runner/custom_python_prehistoric_module.yml index 4ddec8c57..b2d9270f2 100644 --- a/tests/ansible/integration/runner/custom_python_prehistoric_module.yml +++ b/tests/ansible/integration/runner/custom_python_prehistoric_module.yml @@ -1,7 +1,7 @@ # issue #555 - name: integration/runner/custom_python_prehistoric_module.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: - custom_python_prehistoric_module: diff --git a/tests/ansible/integration/runner/custom_python_want_json_module.yml b/tests/ansible/integration/runner/custom_python_want_json_module.yml index d704ee115..f45515bf2 100644 --- a/tests/ansible/integration/runner/custom_python_want_json_module.yml +++ b/tests/ansible/integration/runner/custom_python_want_json_module.yml @@ -1,5 +1,5 @@ - name: integration/runner/custom_python_want_json_module.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: - custom_python_want_json_module: diff --git a/tests/ansible/integration/runner/custom_script_interpreter.yml b/tests/ansible/integration/runner/custom_script_interpreter.yml index 03ea67189..7bb546c10 100644 --- a/tests/ansible/integration/runner/custom_script_interpreter.yml +++ b/tests/ansible/integration/runner/custom_script_interpreter.yml @@ -1,5 +1,5 @@ - name: integration/runner/custom_script_interpreter.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: diff --git a/tests/ansible/integration/runner/environment_isolation.yml b/tests/ansible/integration/runner/environment_isolation.yml index 90110d018..4d6c2ebf3 100644 --- a/tests/ansible/integration/runner/environment_isolation.yml +++ b/tests/ansible/integration/runner/environment_isolation.yml @@ -2,7 +2,7 @@ - name: integration/runner/environment_isolation.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true gather_facts: true tasks: diff --git a/tests/ansible/integration/runner/etc_environment.yml b/tests/ansible/integration/runner/etc_environment.yml index 3a44c753c..9f53630a2 100644 --- a/tests/ansible/integration/runner/etc_environment.yml +++ b/tests/ansible/integration/runner/etc_environment.yml @@ -3,7 +3,7 @@ # but less likely to brick a development workstation - name: integration/runner/etc_environment.yml - hosts: test-targets[0] + hosts: test_targets[0] any_errors_fatal: true gather_facts: true tasks: diff --git a/tests/ansible/integration/runner/forking_active.yml b/tests/ansible/integration/runner/forking_active.yml index 6a0e322d7..7fa56c292 100644 --- a/tests/ansible/integration/runner/forking_active.yml +++ b/tests/ansible/integration/runner/forking_active.yml @@ -1,5 +1,5 @@ - name: integration/runner/forking_active.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: diff --git a/tests/ansible/integration/runner/forking_correct_parent.yml b/tests/ansible/integration/runner/forking_correct_parent.yml index 7fe54e7b9..5c748e789 100644 --- a/tests/ansible/integration/runner/forking_correct_parent.yml +++ b/tests/ansible/integration/runner/forking_correct_parent.yml @@ -1,6 +1,6 @@ - name: integration/runner/forking_correct_parent.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: diff --git a/tests/ansible/integration/runner/forking_inactive.yml b/tests/ansible/integration/runner/forking_inactive.yml index 37282f82a..6432d94e7 100644 --- a/tests/ansible/integration/runner/forking_inactive.yml +++ b/tests/ansible/integration/runner/forking_inactive.yml @@ -1,7 +1,7 @@ # Verify non-async jobs run in-process. - name: integration/runner/forking_inactive.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: diff --git a/tests/ansible/integration/runner/missing_module.yml b/tests/ansible/integration/runner/missing_module.yml index 676012d99..e0afeb70b 100644 --- a/tests/ansible/integration/runner/missing_module.yml +++ b/tests/ansible/integration/runner/missing_module.yml @@ -1,13 +1,13 @@ - name: integration/runner/missing_module.yml - hosts: test-targets[0] + hosts: test_targets[0] connection: local tasks: - connection: local command: | ansible -vvv -i "{{MITOGEN_INVENTORY_FILE}}" - test-targets + test_targets -m missing_module args: chdir: ../.. diff --git a/tests/ansible/integration/ssh/config.yml b/tests/ansible/integration/ssh/config.yml index 4e6748b18..61aaeac38 100644 --- a/tests/ansible/integration/ssh/config.yml +++ b/tests/ansible/integration/ssh/config.yml @@ -1,7 +1,7 @@ # issue #334: test expanduser() on key file during config generation. - name: integration/ssh/config.yml - hosts: test-targets + hosts: test_targets connection: ssh vars: ansible_private_key_file: ~/fakekey diff --git a/tests/ansible/integration/ssh/timeouts.yml b/tests/ansible/integration/ssh/timeouts.yml index d697905af..afbd69c1c 100644 --- a/tests/ansible/integration/ssh/timeouts.yml +++ b/tests/ansible/integration/ssh/timeouts.yml @@ -1,13 +1,13 @@ # Ensure 'ssh' connections time out correctly. - name: integration/ssh/timeouts.yml - hosts: test-targets + hosts: test_targets tasks: - connection: local command: | ansible -vvv -i "{{MITOGEN_INVENTORY_FILE}}" - test-targets + test_targets -m custom_python_detect_environment -e ansible_user=mitogen__slow_user -e ansible_password=slow_user_password args: diff --git a/tests/ansible/integration/ssh/variables.yml b/tests/ansible/integration/ssh/variables.yml index d05ac2887..b8a102ad8 100644 --- a/tests/ansible/integration/ssh/variables.yml +++ b/tests/ansible/integration/ssh/variables.yml @@ -3,7 +3,7 @@ # whatever reason. - name: integration/ssh/variables.yml - hosts: test-targets[0] + hosts: test_targets[0] connection: local vars: # ControlMaster has the effect of caching the previous auth to the same @@ -18,7 +18,7 @@ shell: > ANSIBLE_STRATEGY=mitogen_linear ANSIBLE_SSH_ARGS="" - ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets + ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test_targets -e ansible_ssh_user=mitogen__has_sudo -e ansible_ssh_pass=has_sudo_password args: @@ -29,7 +29,7 @@ - shell: > ANSIBLE_STRATEGY=mitogen_linear ANSIBLE_SSH_ARGS="" - ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets + ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test_targets -e ansible_ssh_user=mitogen__has_sudo -e ansible_ssh_pass=wrong_password args: @@ -48,7 +48,7 @@ shell: > ANSIBLE_STRATEGY=mitogen_linear ANSIBLE_SSH_ARGS="" - ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets + ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test_targets -e ansible_user=mitogen__has_sudo -e ansible_ssh_pass=has_sudo_password args: @@ -59,7 +59,7 @@ - shell: > ANSIBLE_STRATEGY=mitogen_linear ANSIBLE_SSH_ARGS="" - ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets + ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test_targets -e ansible_user=mitogen__has_sudo -e ansible_ssh_pass=wrong_password args: @@ -78,7 +78,7 @@ shell: > ANSIBLE_STRATEGY=mitogen_linear ANSIBLE_SSH_ARGS="" - ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets + ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test_targets -e ansible_user=mitogen__has_sudo -e ansible_password=has_sudo_password args: @@ -89,7 +89,7 @@ - shell: > ANSIBLE_STRATEGY=mitogen_linear ANSIBLE_SSH_ARGS="" - ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets + ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test_targets -e ansible_user=mitogen__has_sudo -e ansible_password=wrong_password args: @@ -113,7 +113,7 @@ shell: > ANSIBLE_STRATEGY=mitogen_linear ANSIBLE_SSH_ARGS="" - ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets + ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test_targets -e ansible_user=mitogen__has_sudo_pubkey -e ansible_ssh_private_key_file=../data/docker/mitogen__has_sudo_pubkey.key args: @@ -124,7 +124,7 @@ - shell: > ANSIBLE_STRATEGY=mitogen_linear ANSIBLE_SSH_ARGS="" - ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test-targets + ansible -m shell -a whoami -i "{{MITOGEN_INVENTORY_FILE}}" test_targets -e ansible_user=mitogen__has_sudo -e ansible_ssh_private_key_file=/dev/null args: diff --git a/tests/ansible/integration/strategy/_mixed_mitogen_vanilla.yml b/tests/ansible/integration/strategy/_mixed_mitogen_vanilla.yml index b2ae7641d..f23d28a5f 100644 --- a/tests/ansible/integration/strategy/_mixed_mitogen_vanilla.yml +++ b/tests/ansible/integration/strategy/_mixed_mitogen_vanilla.yml @@ -2,7 +2,7 @@ # issue #294: ensure running mixed vanilla/Mitogen succeeds. - name: integration/strategy/_mixed_mitogen_vanilla.yml (mitogen_linear) - hosts: test-targets[0] + hosts: test_targets[0] any_errors_fatal: true strategy: mitogen_linear run_once: true @@ -21,7 +21,7 @@ - mitogen_linear - name: integration/strategy/_mixed_mitogen_vanilla.yml (linear) - hosts: test-targets[0] + hosts: test_targets[0] any_errors_fatal: true strategy: linear tasks: @@ -39,7 +39,7 @@ - linear - name: integration/strategy/_mixed_mitogen_vanilla.yml (mitogen_linear) - hosts: test-targets[0] + hosts: test_targets[0] any_errors_fatal: true strategy: mitogen_linear tasks: diff --git a/tests/ansible/integration/strategy/_mixed_vanilla_mitogen.yml b/tests/ansible/integration/strategy/_mixed_vanilla_mitogen.yml index e073d11ad..5a4663f6e 100644 --- a/tests/ansible/integration/strategy/_mixed_vanilla_mitogen.yml +++ b/tests/ansible/integration/strategy/_mixed_vanilla_mitogen.yml @@ -2,7 +2,7 @@ # issue #294: ensure running mixed vanilla/Mitogen succeeds. - name: integration/strategy/_mixed_vanilla_mitogen.yml (linear) - hosts: test-targets[0] + hosts: test_targets[0] any_errors_fatal: true strategy: linear tasks: @@ -20,7 +20,7 @@ - linear - name: integration/strategy/_mixed_vanilla_mitogen.yml (mitogen_linear) - hosts: test-targets[0] + hosts: test_targets[0] any_errors_fatal: true strategy: mitogen_linear tasks: @@ -38,7 +38,7 @@ - mitogen_linear - name: integration/strategy/_mixed_vanilla_mitogen.yml (linear) - hosts: test-targets[0] + hosts: test_targets[0] any_errors_fatal: true strategy: linear tasks: diff --git a/tests/ansible/integration/strategy/mixed_vanilla_mitogen.yml b/tests/ansible/integration/strategy/mixed_vanilla_mitogen.yml index 0f462fea8..7bf03744f 100644 --- a/tests/ansible/integration/strategy/mixed_vanilla_mitogen.yml +++ b/tests/ansible/integration/strategy/mixed_vanilla_mitogen.yml @@ -1,6 +1,6 @@ - name: integration/strategy/mixed_vanilla_mitogen.yml (linear->mitogen->linear) - hosts: test-targets[0] + hosts: test_targets[0] any_errors_fatal: true tasks: - connection: local diff --git a/tests/ansible/integration/stub_connections/kubectl.yml b/tests/ansible/integration/stub_connections/kubectl.yml index e4b881f89..f88a0a9eb 100644 --- a/tests/ansible/integration/stub_connections/kubectl.yml +++ b/tests/ansible/integration/stub_connections/kubectl.yml @@ -1,6 +1,6 @@ - name: integration/stub_connections/kubectl.yml - hosts: test-targets + hosts: test_targets gather_facts: false any_errors_fatal: true tasks: diff --git a/tests/ansible/integration/stub_connections/lxc.yml b/tests/ansible/integration/stub_connections/lxc.yml index ec79cdac3..399b1c7dc 100644 --- a/tests/ansible/integration/stub_connections/lxc.yml +++ b/tests/ansible/integration/stub_connections/lxc.yml @@ -1,6 +1,6 @@ - name: integration/stub_connections/lxc.yml - hosts: test-targets + hosts: test_targets gather_facts: false any_errors_fatal: true tasks: diff --git a/tests/ansible/integration/stub_connections/lxd.yml b/tests/ansible/integration/stub_connections/lxd.yml index cb03232f5..91d624912 100644 --- a/tests/ansible/integration/stub_connections/lxd.yml +++ b/tests/ansible/integration/stub_connections/lxd.yml @@ -1,6 +1,6 @@ - name: integration/stub_connections/lxd.yml - hosts: test-targets + hosts: test_targets gather_facts: false any_errors_fatal: true tasks: diff --git a/tests/ansible/integration/stub_connections/mitogen_doas.yml b/tests/ansible/integration/stub_connections/mitogen_doas.yml index 5e5459352..3887ed57f 100644 --- a/tests/ansible/integration/stub_connections/mitogen_doas.yml +++ b/tests/ansible/integration/stub_connections/mitogen_doas.yml @@ -1,6 +1,6 @@ - name: integration/stub_connections/mitogen_doas.yml - hosts: test-targets + hosts: test_targets gather_facts: false any_errors_fatal: true tasks: diff --git a/tests/ansible/integration/stub_connections/mitogen_sudo.yml b/tests/ansible/integration/stub_connections/mitogen_sudo.yml index 36f69814f..32431c991 100644 --- a/tests/ansible/integration/stub_connections/mitogen_sudo.yml +++ b/tests/ansible/integration/stub_connections/mitogen_sudo.yml @@ -1,6 +1,6 @@ - name: integration/stub_connections/mitogen_sudo.yml - hosts: test-targets + hosts: test_targets gather_facts: false any_errors_fatal: true tasks: diff --git a/tests/ansible/integration/stub_connections/setns_lxc.yml b/tests/ansible/integration/stub_connections/setns_lxc.yml index 447175047..a6e1cfae0 100644 --- a/tests/ansible/integration/stub_connections/setns_lxc.yml +++ b/tests/ansible/integration/stub_connections/setns_lxc.yml @@ -3,7 +3,7 @@ # child Ansible via sudo. But that only works if sudo works. - name: integration/stub_connections/setns_lxc.yml - hosts: test-targets + hosts: test_targets gather_facts: false any_errors_fatal: false connection: local diff --git a/tests/ansible/integration/stub_connections/setns_lxd.yml b/tests/ansible/integration/stub_connections/setns_lxd.yml index 841f78055..7a6073e12 100644 --- a/tests/ansible/integration/stub_connections/setns_lxd.yml +++ b/tests/ansible/integration/stub_connections/setns_lxd.yml @@ -3,7 +3,7 @@ # child Ansible via sudo. But that only works if sudo works. - name: integration/stub_connections/setns_lxd.yml - hosts: test-targets + hosts: test_targets gather_facts: false any_errors_fatal: false connection: local diff --git a/tests/ansible/regression/issue_109__target_has_old_ansible_installed.yml b/tests/ansible/regression/issue_109__target_has_old_ansible_installed.yml index fdc61c059..5b3e38629 100644 --- a/tests/ansible/regression/issue_109__target_has_old_ansible_installed.yml +++ b/tests/ansible/regression/issue_109__target_has_old_ansible_installed.yml @@ -2,7 +2,7 @@ # does not conflict with operation. - name: regression/issue_109__target_has_old_ansible_installed.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true gather_facts: true tasks: diff --git a/tests/ansible/regression/issue_113__duplicate_module_imports.yml b/tests/ansible/regression/issue_113__duplicate_module_imports.yml index b479e025e..63c02c4a2 100644 --- a/tests/ansible/regression/issue_113__duplicate_module_imports.yml +++ b/tests/ansible/regression/issue_113__duplicate_module_imports.yml @@ -3,7 +3,7 @@ - name: regression/issue_113__duplicate_module_imports.yml any_errors_fatal: true - hosts: test-targets + hosts: test_targets tasks: - name: Get auth token diff --git a/tests/ansible/regression/issue_118__script_not_marked_exec.yml b/tests/ansible/regression/issue_118__script_not_marked_exec.yml index e02c49d35..c2f585ba4 100644 --- a/tests/ansible/regression/issue_118__script_not_marked_exec.yml +++ b/tests/ansible/regression/issue_118__script_not_marked_exec.yml @@ -1,7 +1,7 @@ # issue #118 repro: chmod +x not happening during script upload - name: regression/issue_118__script_not_marked_exec.yml - hosts: test-targets + hosts: test_targets become: True tasks: diff --git a/tests/ansible/regression/issue_122__environment_difference.yml b/tests/ansible/regression/issue_122__environment_difference.yml index 273a49ae9..156bde200 100644 --- a/tests/ansible/regression/issue_122__environment_difference.yml +++ b/tests/ansible/regression/issue_122__environment_difference.yml @@ -6,7 +6,7 @@ # - name: regression/issue_122__environment_difference.yml - hosts: test-targets + hosts: test_targets tasks: - script: scripts/print_env.py diff --git a/tests/ansible/regression/issue_140__thread_pileup.yml b/tests/ansible/regression/issue_140__thread_pileup.yml index e6ea83ce7..452ef1850 100644 --- a/tests/ansible/regression/issue_140__thread_pileup.yml +++ b/tests/ansible/regression/issue_140__thread_pileup.yml @@ -3,7 +3,7 @@ # with_items should crash for other reasons (RAM, file descriptor count, ..) - name: regression/issue_140__thread_pileup.yml - hosts: test-targets + hosts: test_targets any_errors_fatal: true tasks: diff --git a/tests/ansible/regression/issue_152__local_action_wrong_interpreter.yml b/tests/ansible/regression/issue_152__local_action_wrong_interpreter.yml index 4da6f5449..7d14838bd 100644 --- a/tests/ansible/regression/issue_152__local_action_wrong_interpreter.yml +++ b/tests/ansible/regression/issue_152__local_action_wrong_interpreter.yml @@ -4,7 +4,7 @@ # can test for. - name: regression/issue_152__local_action_wrong_interpreter.yml - hosts: test-targets + hosts: test_targets connection: local any_errors_fatal: true tasks: diff --git a/tests/ansible/regression/issue_152__virtualenv_python_fails.yml b/tests/ansible/regression/issue_152__virtualenv_python_fails.yml index d3bda041b..50bfffbf3 100644 --- a/tests/ansible/regression/issue_152__virtualenv_python_fails.yml +++ b/tests/ansible/regression/issue_152__virtualenv_python_fails.yml @@ -1,7 +1,7 @@ - name: regression/issue_152__virtualenv_python_fails.yml any_errors_fatal: true gather_facts: true - hosts: test-targets + hosts: test_targets tasks: - custom_python_detect_environment: register: lout diff --git a/tests/ansible/regression/issue_154__module_state_leaks.yml b/tests/ansible/regression/issue_154__module_state_leaks.yml index 59b970d97..a5cea343b 100644 --- a/tests/ansible/regression/issue_154__module_state_leaks.yml +++ b/tests/ansible/regression/issue_154__module_state_leaks.yml @@ -3,7 +3,7 @@ - name: regression/issue_154__module_state_leaks.yml any_errors_fatal: true - hosts: test-targets + hosts: test_targets tasks: - custom_python_leaky_class_vars: diff --git a/tests/ansible/regression/issue_177__copy_module_failing.yml b/tests/ansible/regression/issue_177__copy_module_failing.yml index 7da39962b..f2590423a 100644 --- a/tests/ansible/regression/issue_177__copy_module_failing.yml +++ b/tests/ansible/regression/issue_177__copy_module_failing.yml @@ -1,6 +1,6 @@ - name: regression/issue_177__copy_module_failing.yml any_errors_fatal: true - hosts: test-targets + hosts: test_targets tasks: - copy: diff --git a/tests/ansible/regression/issue_332_ansiblemoduleerror_first_occurrence.yml b/tests/ansible/regression/issue_332_ansiblemoduleerror_first_occurrence.yml index 2433e566a..74f995c6e 100644 --- a/tests/ansible/regression/issue_332_ansiblemoduleerror_first_occurrence.yml +++ b/tests/ansible/regression/issue_332_ansiblemoduleerror_first_occurrence.yml @@ -2,7 +2,7 @@ # AnsibleModuleError. Ensure file fails correctly. - name: regression/issue_332_ansiblemoduleerror_first_occurrence.yml - hosts: test-targets + hosts: test_targets tasks: - file: path=/usr/bin/does-not-exist mode='a-s' state=file follow=yes ignore_errors: true diff --git a/tests/ansible/regression/issue_558_unarchive_failed.yml b/tests/ansible/regression/issue_558_unarchive_failed.yml index 23e9caad0..b36a5ec95 100644 --- a/tests/ansible/regression/issue_558_unarchive_failed.yml +++ b/tests/ansible/regression/issue_558_unarchive_failed.yml @@ -2,7 +2,7 @@ # respecting the passed in 'tmp' parameter on Ansible 2.3. - name: regression/issue_558_unarchive_failed.yml - hosts: test-targets + hosts: test_targets tasks: - file: state=absent path=/tmp/foo - file: state=directory path=/tmp/foo diff --git a/tests/ansible/regression/issue_590__sys_modules_crap.yml b/tests/ansible/regression/issue_590__sys_modules_crap.yml index 52b3ea97a..8efa06792 100644 --- a/tests/ansible/regression/issue_590__sys_modules_crap.yml +++ b/tests/ansible/regression/issue_590__sys_modules_crap.yml @@ -1,5 +1,5 @@ -- hosts: test-targets +- hosts: test_targets tasks: - meta: end_play when: ansible_version.full < '2.8' diff --git a/tests/ansible/regression/issue_591__setuptools_cwd_crash.yml b/tests/ansible/regression/issue_591__setuptools_cwd_crash.yml index 02676cb5d..80b4afbcd 100644 --- a/tests/ansible/regression/issue_591__setuptools_cwd_crash.yml +++ b/tests/ansible/regression/issue_591__setuptools_cwd_crash.yml @@ -3,7 +3,7 @@ # to call getcwd() before AnsibleModule has had a chance to clean up the # process environment. -- hosts: test-targets +- hosts: test_targets tasks: - meta: end_play when: not is_mitogen diff --git a/tests/ansible/setup/report.yml b/tests/ansible/setup/report.yml index 9077158f7..ba0c92a51 100644 --- a/tests/ansible/setup/report.yml +++ b/tests/ansible/setup/report.yml @@ -1,5 +1,5 @@ - name: Report runtime settings - hosts: localhost:test-targets + hosts: localhost:test_targets gather_facts: true tasks: - debug: {var: ansible_facts.distribution} From a080d7f134ff92fecff10ff28062174eb41a9dc8 Mon Sep 17 00:00:00 2001 From: Alex Willmer Date: Sat, 13 Nov 2021 13:22:27 +0000 Subject: [PATCH 2/2] ci: One Tox environment per Azure job --- .ci/azure-pipelines-steps.yml | 13 +- .ci/azure-pipelines.yml | 278 +++++++++++++++--- .ci/azure_matrix | 39 +++ .ci/ci_lib.py | 2 - .ci/localhost_ansible_tests.py | 32 +- .../integration/become/sudo_nonexistent.yml | 1 + .../issue_655__wait_for_connection_error.yml | 47 ++- tests/image_prep/_user_accounts.yml | 2 +- tests/requirements.txt | 2 +- tests/testlib.py | 5 +- tox.ini | 5 +- 11 files changed, 339 insertions(+), 87 deletions(-) create mode 100755 .ci/azure_matrix diff --git a/.ci/azure-pipelines-steps.yml b/.ci/azure-pipelines-steps.yml index fbf3d8fa8..79cee0f60 100644 --- a/.ci/azure-pipelines-steps.yml +++ b/.ci/azure-pipelines-steps.yml @@ -10,7 +10,18 @@ steps: inputs: versionSpec: '$(python.version)' -- script: python -mpip install tox +- task: Cache@2 + displayName: Cache pip packages + inputs: + key: python | "$(Agent.OS)" | tox.ini | tests/requirements.txt | tests/ansible/requirements.txt + restoreKeys: | + python | "$(Agent.OS)" | tox.ini | tests/requirements.txt + python | "$(Agent.OS)" | tox.ini + python | "$(Agent.OS)" + python + path: $(PIP_CACHE_DIR) + +- script: python -mpip --no-python-version-warning --disable-pip-version-check install tox==3.24.4 displayName: Install tooling - script: tox -e "$(tox.env)" diff --git a/.ci/azure-pipelines.yml b/.ci/azure-pipelines.yml index fbfaa2f12..5d1c0f910 100644 --- a/.ci/azure-pipelines.yml +++ b/.ci/azure-pipelines.yml @@ -5,8 +5,9 @@ # User defined variables are also injected as environment variables # https://docs.microsoft.com/en-us/azure/devops/pipelines/process/variables#environment-variables -#variables: +variables: #ANSIBLE_VERBOSITY: 3 + PIP_CACHE_DIR: $(Pipeline.Workspace)/.pip jobs: @@ -20,22 +21,78 @@ jobs: vmImage: macOS-10.15 strategy: matrix: - Mito27_27: + Py27Localhost2.10: + python.version: '2.7' + tox.env: py27-mode_localhost-ansible2.10 + Py27Localhost3: + python.version: '2.7' + tox.env: py27-mode_localhost-ansible3 + Py27Localhost4: + python.version: '2.7' + tox.env: py27-mode_localhost-ansible4 + Py27Mitogen: python.version: '2.7' tox.env: py27-mode_mitogen - - # TODO: test python3, python3 tests are broken - Local_Py27: + Py27Vanilla2.10: + ANSIBLE_SKIP_TAGS: resource_intensive python.version: '2.7' - tox.env: py27-mode_localhost-ansible{2.10,3,4} - - # NOTE: this hangs when ran in Ubuntu 18.04 - Vanilla_Py27: + tox.env: py27-mode_localhost-ansible2.10-strategy_linear + Py27Vanilla3: + ANSIBLE_SKIP_TAGS: resource_intensive python.version: '2.7' - tox.env: py27-mode_localhost-ansible{2.10,3,4} - STRATEGY: linear + tox.env: py27-mode_localhost-ansible3-strategy_linear + Py27Vanilla4: ANSIBLE_SKIP_TAGS: resource_intensive - + python.version: '2.7' + tox.env: py27-mode_localhost-ansible4-strategy_linear + Py36Localhost2.10: + python.version: '3.6' + tox.env: py36-mode_localhost-ansible2.10 + Py36Localhost3: + python.version: '3.6' + tox.env: py36-mode_localhost-ansible3 + Py36Localhost4: + python.version: '3.6' + tox.env: py36-mode_localhost-ansible4 + Py36Mitogen: + python.version: '3.6' + tox.env: py36-mode_mitogen + Py36Vanilla2.10: + ANSIBLE_SKIP_TAGS: resource_intensive + python.version: '3.6' + tox.env: py36-mode_localhost-ansible2.10-strategy_linear + Py36Vanilla3: + ANSIBLE_SKIP_TAGS: resource_intensive + python.version: '3.6' + tox.env: py36-mode_localhost-ansible3-strategy_linear + Py36Vanilla4: + ANSIBLE_SKIP_TAGS: resource_intensive + python.version: '3.6' + tox.env: py36-mode_localhost-ansible4-strategy_linear + Py39Localhost2.10: + python.version: '3.9' + tox.env: py39-mode_localhost-ansible2.10 + Py39Localhost3: + python.version: '3.9' + tox.env: py39-mode_localhost-ansible3 + Py39Localhost4: + python.version: '3.9' + tox.env: py39-mode_localhost-ansible4 + Py39Mitogen: + python.version: '3.9' + tox.env: py39-mode_mitogen + Py39Vanilla2.10: + ANSIBLE_SKIP_TAGS: resource_intensive + python.version: '3.9' + tox.env: py39-mode_localhost-ansible2.10-strategy_linear + Py39Vanilla3: + ANSIBLE_SKIP_TAGS: resource_intensive + python.version: '3.9' + tox.env: py39-mode_localhost-ansible3-strategy_linear + Py39Vanilla4: + ANSIBLE_SKIP_TAGS: resource_intensive + python.version: '3.9' + tox.env: py39-mode_localhost-ansible4-strategy_linear - job: Linux pool: @@ -45,63 +102,204 @@ jobs: - template: azure-pipelines-steps.yml strategy: matrix: - Mito_Py27: - python.version: '2.7' - tox.env: py27-mode_mitogen-distro_{centos6,centos7,centos8,debian9,debian10,debian11,ubuntu1604,ubuntu1804,ubuntu2004} - - Mito_Py36: - python.version: '3.6' - tox.env: py36-mode_mitogen-distro_{centos6,centos7,centos8,debian9,debian10,debian11,ubuntu1604,ubuntu1804,ubuntu2004} - - Mito_Py39: - python.version: '3.9' - tox.env: py39-mode_mitogen-distro_{centos6,centos7,centos8,debian9,debian10,debian11,ubuntu1604,ubuntu1804,ubuntu2004} - #DebOps_2460_27_27: #python.version: '2.7' #MODE: debops_common #VER: 2.4.6.0 - #DebOps_262_36_27: #python.version: '3.6' #MODE: debops_common #VER: 2.6.2 - #Ansible_2460_26: #python.version: '2.7' #MODE: ansible #VER: 2.4.6.0 - #Ansible_262_26: #python.version: '2.7' #MODE: ansible #VER: 2.6.2 - #Ansible_2460_36: #python.version: '3.6' #MODE: ansible #VER: 2.4.6.0 - #Ansible_262_36: #python.version: '3.6' #MODE: ansible #VER: 2.6.2 - #Vanilla_262_27: #python.version: '2.7' #MODE: ansible #VER: 2.6.2 #DISTROS: debian - #STRATEGY: linear - - Ansible_Py27: + #ANSIBLE_STRATEGY: linear + Py27Ansible2.10: python.version: '2.7' - tox.env: py27-mode_ansible-ansible{2.10,3,4} - - Ansible_Py36: + tox.env: py27-mode_ansible-ansible2.10 + Py27Ansible3: + python.version: '2.7' + tox.env: py27-mode_ansible-ansible3 + Py27Ansible4: + python.version: '2.7' + tox.env: py27-mode_ansible-ansible4 + Py27Localhost2.10: + python.version: '2.7' + tox.env: py27-mode_localhost-ansible2.10 + Py27Localhost3: + python.version: '2.7' + tox.env: py27-mode_localhost-ansible3 + Py27Localhost4: + python.version: '2.7' + tox.env: py27-mode_localhost-ansible4 + Py27MitogenCentos6: + python.version: '2.7' + tox.env: py27-mode_mitogen-distro_centos6 + Py27MitogenCentos7: + python.version: '2.7' + tox.env: py27-mode_mitogen-distro_centos7 + Py27MitogenCentos8: + python.version: '2.7' + tox.env: py27-mode_mitogen-distro_centos8 + Py27MitogenDebian10: + python.version: '2.7' + tox.env: py27-mode_mitogen-distro_debian10 + Py27MitogenDebian11: + python.version: '2.7' + tox.env: py27-mode_mitogen-distro_debian11 + Py27MitogenDebian9: + python.version: '2.7' + tox.env: py27-mode_mitogen-distro_debian9 + Py27MitogenUbuntu1604: + python.version: '2.7' + tox.env: py27-mode_mitogen-distro_ubuntu1604 + Py27MitogenUbuntu1804: + python.version: '2.7' + tox.env: py27-mode_mitogen-distro_ubuntu1804 + Py27MitogenUbuntu2004: + python.version: '2.7' + tox.env: py27-mode_mitogen-distro_ubuntu2004 + Py27Vanilla2.10: + ANSIBLE_SKIP_TAGS: resource_intensive + python.version: '2.7' + tox.env: py27-mode_localhost-ansible2.10-strategy_linear + Py27Vanilla3: + ANSIBLE_SKIP_TAGS: resource_intensive + python.version: '2.7' + tox.env: py27-mode_localhost-ansible3-strategy_linear + Py27Vanilla4: + ANSIBLE_SKIP_TAGS: resource_intensive + python.version: '2.7' + tox.env: py27-mode_localhost-ansible4-strategy_linear + Py36Ansible2.10: python.version: '3.6' - tox.env: py36-mode_ansible-ansible{2.10,3,4} - - Ansible_Py39: + tox.env: py36-mode_ansible-ansible2.10 + Py36Ansible3: + python.version: '3.6' + tox.env: py36-mode_ansible-ansible3 + Py36Ansible4: + python.version: '3.6' + tox.env: py36-mode_ansible-ansible4 + Py36Localhost2.10: + python.version: '3.6' + tox.env: py36-mode_localhost-ansible2.10 + Py36Localhost3: + python.version: '3.6' + tox.env: py36-mode_localhost-ansible3 + Py36Localhost4: + python.version: '3.6' + tox.env: py36-mode_localhost-ansible4 + Py36MitogenCentos6: + python.version: '3.6' + tox.env: py36-mode_mitogen-distro_centos6 + Py36MitogenCentos7: + python.version: '3.6' + tox.env: py36-mode_mitogen-distro_centos7 + Py36MitogenCentos8: + python.version: '3.6' + tox.env: py36-mode_mitogen-distro_centos8 + Py36MitogenDebian10: + python.version: '3.6' + tox.env: py36-mode_mitogen-distro_debian10 + Py36MitogenDebian11: + python.version: '3.6' + tox.env: py36-mode_mitogen-distro_debian11 + Py36MitogenDebian9: + python.version: '3.6' + tox.env: py36-mode_mitogen-distro_debian9 + Py36MitogenUbuntu1604: + python.version: '3.6' + tox.env: py36-mode_mitogen-distro_ubuntu1604 + Py36MitogenUbuntu1804: + python.version: '3.6' + tox.env: py36-mode_mitogen-distro_ubuntu1804 + Py36MitogenUbuntu2004: + python.version: '3.6' + tox.env: py36-mode_mitogen-distro_ubuntu2004 + Py36Vanilla2.10: + ANSIBLE_SKIP_TAGS: resource_intensive + python.version: '3.6' + tox.env: py36-mode_localhost-ansible2.10-strategy_linear + Py36Vanilla3: + ANSIBLE_SKIP_TAGS: resource_intensive + python.version: '3.6' + tox.env: py36-mode_localhost-ansible3-strategy_linear + Py36Vanilla4: + ANSIBLE_SKIP_TAGS: resource_intensive + python.version: '3.6' + tox.env: py36-mode_localhost-ansible4-strategy_linear + Py39Ansible2.10: + python.version: '3.9' + tox.env: py39-mode_ansible-ansible2.10 + Py39Ansible3: + python.version: '3.9' + tox.env: py39-mode_ansible-ansible3 + Py39Ansible4: + python.version: '3.9' + tox.env: py39-mode_ansible-ansible4 + Py39Localhost2.10: + python.version: '3.9' + tox.env: py39-mode_localhost-ansible2.10 + Py39Localhost3: + python.version: '3.9' + tox.env: py39-mode_localhost-ansible3 + Py39Localhost4: + python.version: '3.9' + tox.env: py39-mode_localhost-ansible4 + Py39MitogenCentos6: + python.version: '3.9' + tox.env: py39-mode_mitogen-distro_centos6 + Py39MitogenCentos7: + python.version: '3.9' + tox.env: py39-mode_mitogen-distro_centos7 + Py39MitogenCentos8: + python.version: '3.9' + tox.env: py39-mode_mitogen-distro_centos8 + Py39MitogenDebian10: + python.version: '3.9' + tox.env: py39-mode_mitogen-distro_debian10 + Py39MitogenDebian11: + python.version: '3.9' + tox.env: py39-mode_mitogen-distro_debian11 + Py39MitogenDebian9: + python.version: '3.9' + tox.env: py39-mode_mitogen-distro_debian9 + Py39MitogenUbuntu1604: + python.version: '3.9' + tox.env: py39-mode_mitogen-distro_ubuntu1604 + Py39MitogenUbuntu1804: + python.version: '3.9' + tox.env: py39-mode_mitogen-distro_ubuntu1804 + Py39MitogenUbuntu2004: + python.version: '3.9' + tox.env: py39-mode_mitogen-distro_ubuntu2004 + Py39Vanilla2.10: + ANSIBLE_SKIP_TAGS: resource_intensive + python.version: '3.9' + tox.env: py39-mode_localhost-ansible2.10-strategy_linear + Py39Vanilla3: + ANSIBLE_SKIP_TAGS: resource_intensive + python.version: '3.9' + tox.env: py39-mode_localhost-ansible3-strategy_linear + Py39Vanilla4: + ANSIBLE_SKIP_TAGS: resource_intensive python.version: '3.9' - tox.env: py39-mode_ansible-ansible{2.10,3,4} + tox.env: py39-mode_localhost-ansible4-strategy_linear diff --git a/.ci/azure_matrix b/.ci/azure_matrix new file mode 100755 index 000000000..e18943eb6 --- /dev/null +++ b/.ci/azure_matrix @@ -0,0 +1,39 @@ +#!/usr/bin/env python3 + +import sys + +import yaml + +def matrix(): + for py in '2.7 3.6 3.9'.split(): + pynodot = py.replace('.', '') + for mode in ['ansible', 'localhost']: + for ansible in '2.10 3 4'.split(): + yield { + "name": f"Py{pynodot}{mode.title()}{ansible}", + "vars": { + "python.version": py, + "tox.env": f"py{pynodot}-mode_{mode}-ansible{ansible}", + }, + } + if mode in {'localhost'}: + yield { + "name": f"Py{pynodot}Vanilla{ansible}", + "vars": { + "ANSIBLE_SKIP_TAGS": "resource_intensive", + "python.version": py, + "tox.env": f"py{pynodot}-mode_{mode}-ansible{ansible}-strategy_linear", + }, + } + for mode in ['mitogen']: + for distro in 'centos6,centos7,centos8,debian9,debian10,debian11,ubuntu1604,ubuntu1804,ubuntu2004'.split(','): + yield { + "name": f"Py{pynodot}{mode.title()}{distro.title()}", + "vars": { + "python.version": py, + "tox.env": f"py{pynodot}-mode_{mode}-distro_{distro}", + }, + } + +d = {x['name']: x['vars'] for x in matrix()} +yaml.dump(d, stream=sys.stdout) diff --git a/.ci/ci_lib.py b/.ci/ci_lib.py index 65b7265ae..67d20a270 100644 --- a/.ci/ci_lib.py +++ b/.ci/ci_lib.py @@ -193,8 +193,6 @@ def __enter__(self): pass def __exit__(self, _1, _2, _3): pass -os.environ.setdefault('ANSIBLE_STRATEGY', - os.environ.get('STRATEGY', 'mitogen_linear')) GIT_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) # Used only when MODE=mitogen DISTRO = os.environ.get('DISTRO', 'debian9') diff --git a/.ci/localhost_ansible_tests.py b/.ci/localhost_ansible_tests.py index a54d45d9c..6337212a8 100755 --- a/.ci/localhost_ansible_tests.py +++ b/.ci/localhost_ansible_tests.py @@ -2,6 +2,7 @@ # Run tests/ansible/all.yml under Ansible and Ansible-Mitogen import os +import subprocess import sys import ci_lib @@ -24,29 +25,34 @@ # NOTE: sshpass v1.06 causes errors so pegging to 1.05 -> "msg": "Error when changing password","out": "passwd: DS error: eDSAuthFailed\n", # there's a checksum error with "brew install http://git.io/sshpass.rb" though, so installing manually if not ci_lib.exists_in_path('sshpass'): - os.system("curl -O -L https://sourceforge.net/projects/sshpass/files/sshpass/1.05/sshpass-1.05.tar.gz && \ + subprocess.check_call( + "curl -O -L https://sourceforge.net/projects/sshpass/files/sshpass/1.05/sshpass-1.05.tar.gz && \ tar xvf sshpass-1.05.tar.gz && \ cd sshpass-1.05 && \ ./configure && \ - sudo make install") + sudo make install", + shell=True, + ) with ci_lib.Fold('machine_prep'): # generate a new ssh key for localhost ssh if not os.path.exists(os.path.expanduser("~/.ssh/id_rsa")): - os.system("ssh-keygen -P '' -m pem -f ~/.ssh/id_rsa") - os.system("cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys") + subprocess.check_call("ssh-keygen -P '' -m pem -f ~/.ssh/id_rsa", shell=True) + subprocess.check_call("cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys", shell=True) + os.chmod(os.path.expanduser('~/.ssh'), int('0700', 8)) + os.chmod(os.path.expanduser('~/.ssh/authorized_keys'), int('0600', 8)) + #ci_lib.dump_file(os.path.expanduser('~/.ssh/authorized_keys')) + #ci_lib.dump_file('/etc/ssh/sshd_config') + #subprocess.check_call('ssh -vvv -i ~/.ssh/id_rsa -o BatchMode=no -o UserKnownHostsFile=/dev/null -o PasswordAuthentication=no -o PreferredAuthentications=publickey -o IdentitiesOnly=yes -o StrictHostKeyChecking=no localhost whoami', shell=True) # also generate it for the sudo user - if os.system("sudo [ -f /var/root/.ssh/id_rsa ]") != 0: - os.system("sudo ssh-keygen -P '' -m pem -f /var/root/.ssh/id_rsa") - os.system("sudo cat /var/root/.ssh/id_rsa.pub | sudo tee -a /var/root/.ssh/authorized_keys") - - os.chmod(os.path.expanduser('~/.ssh'), int('0700', 8)) - os.chmod(os.path.expanduser('~/.ssh/authorized_keys'), int('0600', 8)) - # run chmod through sudo since it's owned by root - os.system('sudo chmod 700 /var/root/.ssh') - os.system('sudo chmod 600 /var/root/.ssh/authorized_keys') + if os.system("sudo [ -f ~root/.ssh/id_rsa ]") != 0: + subprocess.check_call("sudo ssh-keygen -P '' -m pem -f ~root/.ssh/id_rsa", shell=True) + subprocess.check_call("sudo cat ~root/.ssh/id_rsa.pub | sudo tee -a ~root/.ssh/authorized_keys", shell=True) + subprocess.check_call('sudo chmod 700 ~root/.ssh', shell=True) + subprocess.check_call('sudo chmod 600 ~root/.ssh/authorized_keys', shell=True) + #subprocess.check_call('sudo ssh -vvv -i ~root/.ssh/id_rsa -o BatchMode=no -o UserKnownHostsFile=/dev/null -o PasswordAuthentication=no -o PreferredAuthentications=publickey -o IdentitiesOnly=yes -o StrictHostKeyChecking=no localhost whoami', shell=True) if os.path.expanduser('~mitogen__user1') == '~mitogen__user1': os.chdir(IMAGE_PREP_DIR) diff --git a/tests/ansible/integration/become/sudo_nonexistent.yml b/tests/ansible/integration/become/sudo_nonexistent.yml index cec494ba7..6ba33ac4b 100644 --- a/tests/ansible/integration/become/sudo_nonexistent.yml +++ b/tests/ansible/integration/become/sudo_nonexistent.yml @@ -25,6 +25,7 @@ 'sudo: unknown user: slartibartfast' in out.module_stdout | default(out.msg) or 'sudo: unknown user: slartibartfast' in out.module_stderr | default(out.msg) or (ansible_facts.os_family == 'RedHat' and ansible_facts.distribution_version == '6.10') + or 'Failed to set permissions on the temporary files Ansible needs to create when becoming an unprivileged user (rc: 1, err: chmod: Invalid file mode: A+user:slartibartfast:rx:allow\n})' in out.msg fail_msg: out={{out}} when: # https://github.com/ansible/ansible/pull/70785 diff --git a/tests/ansible/regression/issue_655__wait_for_connection_error.yml b/tests/ansible/regression/issue_655__wait_for_connection_error.yml index 307dead57..d495c70d5 100644 --- a/tests/ansible/regression/issue_655__wait_for_connection_error.yml +++ b/tests/ansible/regression/issue_655__wait_for_connection_error.yml @@ -13,36 +13,33 @@ - name: set up test container and run tests inside it block: - name: install deps - block: - - name: install docker - shell: | - # NOTE: for tracking purposes: https://github.com/docker/for-mac/issues/2359 - # using docker for mac CI workaround: https://github.com/drud/ddev/pull/1748/files#diff-19288f650af2dabdf1dcc5b354d1f245 - DOCKER_URL=https://download.docker.com/mac/stable/31259/Docker.dmg && - curl -O -sSL $DOCKER_URL && - open -W Docker.dmg && cp -r /Volumes/Docker/Docker.app /Applications - sudo /Applications/Docker.app/Contents/MacOS/Docker --quit-after-install --unattended && - ln -s /Applications/Docker.app/Contents/Resources/bin/docker /usr/local/bin/docker && - nohup /Applications/Docker.app/Contents/MacOS/Docker --unattended & - # wait 2 min for docker to come up - counter=0 && - while ! /usr/local/bin/docker ps 2>/dev/null ; do - if [ $counter -lt 24 ]; then - let counter=counter+1 - else - exit 1 - fi - sleep 5 - done + homebrew: + name: + - podman + state: present + + - name: start machine + command: + cmd: "{{ item.cmd }}" + loop: + - cmd: podman machine init + - cmd: podman machine start + - cmd: sleep 10 # FIXME Find a way to wait until the machine is available + - cmd: podman info + register: podman_machine + + - debug: + var: podman_machine # python bindings (docker_container) aren't working on this host, so gonna shell out - - name: create docker container - shell: /usr/local/bin/docker run --name testMitogen -d --rm centos:8 bash -c "sleep infinity & wait" + - name: create container + command: + cmd: podman run --name=testMitogen --detach --rm centos:8 bash -c "sleep infinity & wait" - name: add container to inventory add_host: name: testMitogen - ansible_connection: docker + ansible_connection: podman ansible_user: root changed_when: false environment: @@ -82,6 +79,6 @@ PATH: /usr/local/bin/:{{ ansible_env.PATH }} - name: remove test container - shell: /usr/local/bin/docker stop testMitogen + shell: podman stop testMitogen tags: - issue_655 diff --git a/tests/image_prep/_user_accounts.yml b/tests/image_prep/_user_accounts.yml index 6224b61a3..f8a95e06e 100644 --- a/tests/image_prep/_user_accounts.yml +++ b/tests/image_prep/_user_accounts.yml @@ -108,7 +108,7 @@ when: ansible_system == 'Linux' and out.stat.exists service: name: accounts-daemon - restarted: true + state: restarted - name: Readonly homedir for one account shell: "chown -R root: ~mitogen__readonly_homedir" diff --git a/tests/requirements.txt b/tests/requirements.txt index c125a28ff..c0ad502e0 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,8 +1,8 @@ -psutil==5.4.8 coverage==4.5.1 Django==1.6.11 # Last version supporting 2.6. faulthandler==3.2; python_version < '3.3' mock==2.0.0 +psutil==5.8.0 pytz==2018.5 cffi==1.14.3 # Random pin to try and fix pyparser==2.18 not having effect pycparser==2.18 # Last version supporting 2.6. diff --git a/tests/testlib.py b/tests/testlib.py index d40ce573b..89ee48c16 100644 --- a/tests/testlib.py +++ b/tests/testlib.py @@ -11,6 +11,7 @@ import time import traceback +import psutil import unittest2 import mitogen.core @@ -67,7 +68,6 @@ def get_fd_count(): """ Return the number of FDs open by this process. """ - import psutil return psutil.Process().num_fds() @@ -386,7 +386,8 @@ def _teardown_check_zombies(self): print('') print('Children of unit test process:') - os.system('ps uww --ppid ' + str(os.getpid())) + child_pids = ','.join(str(p.pid) for p in psutil.Process().children()) + subprocess.check_call(['ps', '-fww', '-p', child_pids]) assert 0, "%s leaked still-running subprocesses." % (self,) def tearDown(self): diff --git a/tox.ini b/tox.ini index 6e51d7ed4..8bf1e1b50 100644 --- a/tox.ini +++ b/tox.ini @@ -65,7 +65,7 @@ deps = ansible3: ansible==3.4.0 ansible4: ansible==4.8.0 install_command = - python -m pip --no-python-version-warning install {opts} {packages} + python -mpip --no-python-version-warning --disable-pip-version-check install {opts} {packages} commands_pre = mode_ansible: {toxinidir}/.ci/ansible_install.py mode_debops_common: {toxinidir}/.ci/debops_common_install.py @@ -83,6 +83,7 @@ passenv = AWS_SECRET_ACCESS_KEY HOME setenv = + ANSIBLE_STRATEGY = mitogen_linear NOCOVERAGE_ERASE = 1 NOCOVERAGE_REPORT = 1 # Only applicable to MODE=mitogen @@ -113,7 +114,7 @@ setenv = mode_ansible: MODE=ansible mode_debops_common: MODE=debops_common mode_mitogen: MODE=mitogen - strategy_linear: STRATEGY=linear + strategy_linear: ANSIBLE_STRATEGY=linear whitelist_externals = docker docker-credential-secretservice