diff --git a/tests/ansible/integration/strategy/_mixed_mitogen_vanilla.yml b/tests/ansible/integration/strategy/_mixed_mitogen_vanilla.yml new file mode 100644 index 00000000..7ac39e8e --- /dev/null +++ b/tests/ansible/integration/strategy/_mixed_mitogen_vanilla.yml @@ -0,0 +1,45 @@ + +# issue #294: ensure running mixed vanilla/Mitogen succeeds. + +- name: integration/strategy/_mixed_mitogen_vanilla.yml (mitogen_linear) + hosts: test-targets + any_errors_fatal: true + strategy: mitogen_linear + tasks: + - custom_python_detect_environment: + register: out + - assert: + that: out.mitogen_loaded + + - determine_strategy: + - assert: + that: strategy == 'ansible.plugins.strategy.mitogen_linear.StrategyModule' + +- name: integration/strategy/_mixed_mitogen_vanilla.yml (linear) + hosts: test-targets + any_errors_fatal: true + strategy: linear + tasks: + - custom_python_detect_environment: + register: out + - assert: + that: not out.mitogen_loaded + + - determine_strategy: + - assert: + that: strategy == 'ansible.plugins.strategy.linear.StrategyModule' + + +- name: integration/strategy/_mixed_mitogen_vanilla.yml (mitogen_linear) + hosts: test-targets + any_errors_fatal: true + strategy: mitogen_linear + tasks: + - custom_python_detect_environment: + register: out + - assert: + that: out.mitogen_loaded + + - determine_strategy: + - assert: + that: strategy == 'ansible.plugins.strategy.mitogen_linear.StrategyModule' diff --git a/tests/ansible/integration/strategy/mixed_vanilla_ansible.yml b/tests/ansible/integration/strategy/_mixed_vanilla_mitogen.yml similarity index 82% rename from tests/ansible/integration/strategy/mixed_vanilla_ansible.yml rename to tests/ansible/integration/strategy/_mixed_vanilla_mitogen.yml index f9cda746..891787af 100644 --- a/tests/ansible/integration/strategy/mixed_vanilla_ansible.yml +++ b/tests/ansible/integration/strategy/_mixed_vanilla_mitogen.yml @@ -1,7 +1,7 @@ # issue #294: ensure running mixed vanilla/Mitogen succeeds. -- name: integration/strategy/mixed_vanilla_ansible.yml (linear) +- name: integration/strategy/_mixed_vanilla_mitogen.yml (linear) hosts: test-targets any_errors_fatal: true strategy: linear @@ -15,7 +15,7 @@ - assert: that: strategy == 'ansible.plugins.strategy.linear.StrategyModule' -- name: integration/strategy/mixed_vanilla_ansible.yml (mitogen_linear) +- name: integration/strategy/_mixed_vanilla_mitogen.yml (mitogen_linear) hosts: test-targets any_errors_fatal: true strategy: mitogen_linear @@ -30,7 +30,7 @@ that: strategy == 'ansible.plugins.strategy.mitogen_linear.StrategyModule' -- name: integration/strategy/mixed_vanilla_ansible.yml (linear) +- name: integration/strategy/_mixed_vanilla_mitogen.yml (linear) hosts: test-targets any_errors_fatal: true strategy: linear diff --git a/tests/ansible/integration/strategy/all.yml b/tests/ansible/integration/strategy/all.yml index 3e1b1360..3304817c 100644 --- a/tests/ansible/integration/strategy/all.yml +++ b/tests/ansible/integration/strategy/all.yml @@ -1 +1 @@ -- import_playbook: mixed_vanilla_ansible.yml +- import_playbook: mixed_vanilla_mitogen.yml diff --git a/tests/ansible/integration/strategy/mixed_vanilla_mitogen.yml b/tests/ansible/integration/strategy/mixed_vanilla_mitogen.yml new file mode 100644 index 00000000..61a55825 --- /dev/null +++ b/tests/ansible/integration/strategy/mixed_vanilla_mitogen.yml @@ -0,0 +1,22 @@ + +- name: integration/strategy/mixed_vanilla_mitogen.yml (linear->mitogen->linear) + hosts: test-targets + any_errors_fatal: true + tasks: + - connection: local + command: | + ansible-playbook + -i "{{inventory_file}}" + integration/strategy/_mixed_mitogen_vanilla.yml + args: + chdir: ../.. + register: out + + - connection: local + command: | + ansible-playbook + -i "{{inventory_file}}" + integration/strategy/_mixed_vanilla_mitogen.yml + args: + chdir: ../.. + register: out