Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add include_import tests for many top level include_tasks #36531

Merged
merged 2 commits into from
Apr 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 18 additions & 4 deletions test/integration/targets/include_import/runme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ set -eux

export ANSIBLE_ROLES_PATH=./roles

function gen_task_files() {
for i in $(seq -f '%03g' 1 39); do
echo -e "- name: Hello Message\n debug:\n msg: Task file ${i}" > "tasks/hello/tasks-file-${i}.yml"
done
}

## Import (static)

# Playbook
Expand Down Expand Up @@ -33,11 +39,19 @@ ANSIBLE_STRATEGY='linear' ansible-playbook role/test_include_role.yml -i ../../i
ANSIBLE_STRATEGY='free' ansible-playbook role/test_include_role.yml -i ../../inventory "$@" --skip-tags never


## Recursion
## Max Recursion Depth
# https://github.com/ansible/ansible/issues/23609
ANSIBLE_STRATEGY='linear' ansible-playbook test_recursion.yml -i ../../inventory "$@" --skip-tags never
ANSIBLE_STRATEGY='linear' ansible-playbook test_role_recursion.yml -i ../../inventory "$@" --skip-tags never

## Nested tasks
# https://github.com/ansible/ansible/issues/34782
ANSIBLE_STRATEGY='linear' ansible-playbook nested.yml -i ../../inventory "$@" --skip-tags never
ANSIBLE_STRATEGY='free' ansible-playbook nested.yml -i ../../inventory "$@" --skip-tags never
ANSIBLE_STRATEGY='linear' ansible-playbook test_nested_tasks.yml -i ../../inventory "$@" --skip-tags never
ANSIBLE_STRATEGY='free' ansible-playbook test_nested_tasks.yml -i ../../inventory "$@" --skip-tags never

## Tons of top level include_tasks
# https://github.com/ansible/ansible/issues/36053
# Fixed by https://github.com/ansible/ansible/pull/36075
gen_task_files
ANSIBLE_STRATEGY='linear' ansible-playbook test_copious_include_tasks.yml -i ../../inventory "$@" --skip-tags never
ANSIBLE_STRATEGY='free' ansible-playbook test_copious_include_tasks.yml -i ../../inventory "$@" --skip-tags never
rm -f tasks/hello/*.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tasks-file-*
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
- name: Test many include_tasks
hosts: testhost
gather_facts: no

tasks:
- include_tasks: "{{ playbook_dir }}/tasks/hello/tasks-file-001.yml"
- include_tasks: "{{ playbook_dir }}/tasks/hello/tasks-file-002.yml"
- include_tasks: "{{ playbook_dir }}/tasks/hello/tasks-file-003.yml"
- include_tasks: "{{ playbook_dir }}/tasks/hello/tasks-file-004.yml"
- include_tasks: "{{ playbook_dir }}/tasks/hello/tasks-file-005.yml"
- include_tasks: "{{ playbook_dir }}/tasks/hello/tasks-file-006.yml"
- include_tasks: "{{ playbook_dir }}/tasks/hello/tasks-file-007.yml"
- include_tasks: "{{ playbook_dir }}/tasks/hello/tasks-file-008.yml"
- include_tasks: "{{ playbook_dir }}/tasks/hello/tasks-file-009.yml"
- include_tasks: "{{ playbook_dir }}/tasks/hello/tasks-file-010.yml"
- include_tasks: "{{ playbook_dir }}/tasks/hello/tasks-file-011.yml"
- include_tasks: "{{ playbook_dir }}/tasks/hello/tasks-file-012.yml"
- include_tasks: "{{ playbook_dir }}/tasks/hello/tasks-file-013.yml"
- include_tasks: "{{ playbook_dir }}/tasks/hello/tasks-file-014.yml"
- include_tasks: "{{ playbook_dir }}/tasks/hello/tasks-file-015.yml"
- include_tasks: "{{ playbook_dir }}/tasks/hello/tasks-file-016.yml"
- include_tasks: "{{ playbook_dir }}/tasks/hello/tasks-file-017.yml"
- include_tasks: "{{ playbook_dir }}/tasks/hello/tasks-file-018.yml"
- include_tasks: "{{ playbook_dir }}/tasks/hello/tasks-file-019.yml"
- include_tasks: "{{ playbook_dir }}/tasks/hello/tasks-file-020.yml"
- include_tasks: "{{ playbook_dir }}/tasks/hello/tasks-file-021.yml"
- include_tasks: "{{ playbook_dir }}/tasks/hello/tasks-file-022.yml"
- include_tasks: "{{ playbook_dir }}/tasks/hello/tasks-file-023.yml"
- include_tasks: "{{ playbook_dir }}/tasks/hello/tasks-file-024.yml"
- include_tasks: "{{ playbook_dir }}/tasks/hello/tasks-file-025.yml"
- include_tasks: "{{ playbook_dir }}/tasks/hello/tasks-file-026.yml"
- include_tasks: "{{ playbook_dir }}/tasks/hello/tasks-file-027.yml"
- include_tasks: "{{ playbook_dir }}/tasks/hello/tasks-file-028.yml"
- include_tasks: "{{ playbook_dir }}/tasks/hello/tasks-file-029.yml"
- include_tasks: "{{ playbook_dir }}/tasks/hello/tasks-file-030.yml"
- include_tasks: "{{ playbook_dir }}/tasks/hello/tasks-file-031.yml"
- include_tasks: "{{ playbook_dir }}/tasks/hello/tasks-file-032.yml"
- include_tasks: "{{ playbook_dir }}/tasks/hello/tasks-file-033.yml"
- include_tasks: "{{ playbook_dir }}/tasks/hello/tasks-file-034.yml"
- include_tasks: "{{ playbook_dir }}/tasks/hello/tasks-file-035.yml"
- include_tasks: "{{ playbook_dir }}/tasks/hello/tasks-file-036.yml"
- include_tasks: "{{ playbook_dir }}/tasks/hello/tasks-file-037.yml"
- include_tasks: "{{ playbook_dir }}/tasks/hello/tasks-file-038.yml"
- include_tasks: "{{ playbook_dir }}/tasks/hello/tasks-file-039.yml"
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
include+meta doesnt mess included files mecanisms
hosts: testhost
tasks:
- include_tasks: ./tasks/nested/nested.yml
- include_tasks: ./tasks/nested/nested.yml