From e133b8dbb1214f6b38d38d4e8abb937b2adc57ac Mon Sep 17 00:00:00 2001 From: David Wilson Date: Sun, 27 Jan 2019 04:31:59 +0000 Subject: [PATCH] issue #477: some more conditional tests. --- .../integration/async/result_shell_echo_hi.yml | 12 ++++++++---- .../connection_delegation/delegate_to_template.yml | 3 +++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/tests/ansible/integration/async/result_shell_echo_hi.yml b/tests/ansible/integration/async/result_shell_echo_hi.yml index dbf40bde..c2d2dc42 100644 --- a/tests/ansible/integration/async/result_shell_echo_hi.yml +++ b/tests/ansible/integration/async/result_shell_echo_hi.yml @@ -16,9 +16,7 @@ src: "{{ansible_user_dir}}/.ansible_async/{{job.ansible_job_id}}" register: result - #- debug: msg={{async_out}} - #vars: - #async_out: "{{result.content|b64decode|from_json}}" + #- debug: msg="{{result.content|b64decode|from_json}}" - assert: that: @@ -32,7 +30,6 @@ - async_out.invocation.module_args.creates == None - async_out.invocation.module_args.executable == None - async_out.invocation.module_args.removes == None - - async_out.invocation.module_args.stdin == None - async_out.invocation.module_args.warn == True - async_out.rc == 0 - async_out.start.startswith("20") @@ -40,3 +37,10 @@ - async_out.stdout == "hi" vars: async_out: "{{result.content|b64decode|from_json}}" + + - assert: + that: + - async_out.invocation.module_args.stdin == None + when: ansible_version.full > '2.4' + vars: + async_out: "{{result.content|b64decode|from_json}}" diff --git a/tests/ansible/integration/connection_delegation/delegate_to_template.yml b/tests/ansible/integration/connection_delegation/delegate_to_template.yml index 1ffdc714..f0626ce9 100644 --- a/tests/ansible/integration/connection_delegation/delegate_to_template.yml +++ b/tests/ansible/integration/connection_delegation/delegate_to_template.yml @@ -19,6 +19,9 @@ - meta: end_play when: not is_mitogen + - meta: end_play + when: ansible_version.full < '2.4' + - mitogen_get_stack: delegate_to: "{{ physical_host }}" register: out