diff --git a/test/integration/targets/prepare_vmware_tests/tasks/init_real_lab.yml b/test/integration/targets/prepare_vmware_tests/tasks/init_real_lab.yml index e076c34ad4c..c707c3728c4 100644 --- a/test/integration/targets/prepare_vmware_tests/tasks/init_real_lab.yml +++ b/test/integration/targets/prepare_vmware_tests/tasks/init_real_lab.yml @@ -25,3 +25,5 @@ when: setup_category is defined - include_tasks: setup_tag.yml when: setup_tag is defined + - include_tasks: setup_content_library.yml + when: setup_content_library is defined diff --git a/test/integration/targets/prepare_vmware_tests/tasks/setup_content_library.yml b/test/integration/targets/prepare_vmware_tests/tasks/setup_content_library.yml new file mode 100644 index 00000000000..02a5514551a --- /dev/null +++ b/test/integration/targets/prepare_vmware_tests/tasks/setup_content_library.yml @@ -0,0 +1,11 @@ +- name: Create Content Library + vmware_content_library_manager: + hostname: '{{ vcenter_hostname }}' + username: '{{ vcenter_username }}' + password: '{{ vcenter_password }}' + library_name: test-content-lib + library_description: 'Library created by the prepare_vmware_tests role' + library_type: local + datastore_name: '{{ ds2 }}' + validate_certs: False + state: present diff --git a/test/integration/targets/vmware_content_library_info/tasks/main.yml b/test/integration/targets/vmware_content_library_info/tasks/main.yml index 2bac347562f..bfbdd416cfa 100644 --- a/test/integration/targets/vmware_content_library_info/tasks/main.yml +++ b/test/integration/targets/vmware_content_library_info/tasks/main.yml @@ -4,6 +4,14 @@ - when: vcsim is not defined block: + + - import_role: + name: prepare_vmware_tests + vars: + setup_attach_host: true + setup_datastore: true + setup_content_library: true + # Get List of Content Libraries - name: Get List of Content Libraries vmware_content_library_info: @@ -13,6 +21,7 @@ validate_certs: false register: content_library_info + - debug: var=content_library_info - set_fact: content_library="{{ content_library_info['content_libs'][0] }}" # Get Details of content library