From 39ce134c2c3843156e9e0bf560c3afd23b5799bc Mon Sep 17 00:00:00 2001 From: Emilien Kenler Date: Wed, 15 Oct 2014 11:12:35 +0900 Subject: [PATCH] Add integration test for the shell module * it ensures that it's possible to define options in the multiline block --- .../roles/test_command_shell/tasks/main.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/integration/roles/test_command_shell/tasks/main.yml b/test/integration/roles/test_command_shell/tasks/main.yml index 8a15c99957a..3c273260c11 100644 --- a/test/integration/roles/test_command_shell/tasks/main.yml +++ b/test/integration/roles/test_command_shell/tasks/main.yml @@ -198,3 +198,19 @@ that: - "shell_result6.changed" - "shell_result6.stdout == '32f3cc201b69ed8afa3902b80f554ca8\nthis is a second line'" + +- name: execute a shell command using a literal multiline block with arguments in it + shell: | + executable=/bin/bash + creates={{output_dir_test | expanduser}}/afile.txt + echo "test" + register: shell_result7 + +- name: assert the multiline shell command with arguments in it run as expected + assert: + that: + - "shell_result7.changed" + - "shell_result7.stdout == 'test'" + +- name: remove the previously created file + file: path={{output_dir_test}}/afile.txt state=absent