From dc01f9e47e599ad8e41df0e47d9d9f5bb7e5805d Mon Sep 17 00:00:00 2001 From: David Wilson Date: Wed, 23 Jan 2019 12:44:08 +0000 Subject: [PATCH] issue #477: Ansible 2.3 module output format difference. Don't test for keys it doesn't set. --- .../runner/custom_perl_json_args_module.yml | 14 +++++++++----- .../runner/custom_perl_want_json_module.yml | 14 +++++++++----- 2 files changed, 18 insertions(+), 10 deletions(-) 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 3485463d..5648950e 100644 --- a/tests/ansible/integration/runner/custom_perl_json_args_module.yml +++ b/tests/ansible/integration/runner/custom_perl_json_args_module.yml @@ -8,8 +8,12 @@ register: out - assert: - that: | - (not out.changed) and - (not out.results[0].changed) and - out.results[0].input[0].foo and - out.results[0].message == 'I am a perl script! Here is my input.' + that: + - out.results[0].input[0].foo + - out.results[0].message == 'I am a perl script! Here is my input.' + + - when: ansible_version.full > '2.4' + assert: + that: + - (not out.changed) + - (not out.results[0].changed) 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 69a1b57b..ffdf4ab7 100644 --- a/tests/ansible/integration/runner/custom_perl_want_json_module.yml +++ b/tests/ansible/integration/runner/custom_perl_want_json_module.yml @@ -8,8 +8,12 @@ register: out - assert: - that: | - (not out.changed) and - (not out.results[0].changed) and - out.results[0].input[0].foo and - out.results[0].message == 'I am a want JSON perl script! Here is my input.' + that: + - out.results[0].input[0].foo + - out.results[0].message == 'I am a want JSON perl script! Here is my input.' + + - when: ansible_version.full > '2.4' + assert: + that: + - (not out.changed) + - (not out.results[0].changed)