diff --git a/test/integration/roles/test_bad_parsing/meta/main.yml b/test/integration/roles/test_bad_parsing/meta/main.yml new file mode 100644 index 0000000000..a8b63dfdf2 --- /dev/null +++ b/test/integration/roles/test_bad_parsing/meta/main.yml @@ -0,0 +1,3 @@ +dependencies: + - prepare_tests + diff --git a/test/integration/roles/test_good_parsing/meta/main.yml b/test/integration/roles/test_good_parsing/meta/main.yml new file mode 100644 index 0000000000..1050c23ce3 --- /dev/null +++ b/test/integration/roles/test_good_parsing/meta/main.yml @@ -0,0 +1,3 @@ +dependencies: + - prepare_tests + diff --git a/test/integration/roles/test_good_parsing/tasks/main.yml b/test/integration/roles/test_good_parsing/tasks/main.yml index 673990d692..09532dad4b 100644 --- a/test/integration/roles/test_good_parsing/tasks/main.yml +++ b/test/integration/roles/test_good_parsing/tasks/main.yml @@ -116,3 +116,22 @@ that: # command shouldn't end in spaces, amend test once fixed - result.cmd == "echo foo --arg=a --arg=b" + +- name: create a test file to include + copy: 'dest={{ output_dir }}/test_include.yml content="- debug: var=param\n"' + register: result + +- name: assert that the test include file was created + assert: + that: + - result.changed + +- name: test includes with params + include: "{{ output_dir }}/test_include.yml param={{ test_input }}" + register: result + +- debug: var=result + +- assert: + that: + - 'result.dest == "{{ output_dir|expanduser }}/test_include.yml"'