diff options
author | Orr <orryun@gmail.com> | 2018-07-30 07:41:42 +0200 |
---|---|---|
committer | Abhijeet Kasurde <akasurde@redhat.com> | 2018-07-30 07:41:42 +0200 |
commit | 1e4831e7448c5df2325f191a7cb49c0b3d4ed8c9 (patch) | |
tree | 4f45bb5ebe8b61c93a78d1566c77e8417af8c40d /test/integration/targets/vcenter_folder | |
parent | New module: routeros — manage MikroTik RouterOS (#41155) (diff) | |
download | ansible-1e4831e7448c5df2325f191a7cb49c0b3d4ed8c9.tar.xz ansible-1e4831e7448c5df2325f191a7cb49c0b3d4ed8c9.zip |
VMware: check if folder already exists before creation (#41588)
* check if folder already exists before creation
* added integration test
Diffstat (limited to 'test/integration/targets/vcenter_folder')
-rw-r--r-- | test/integration/targets/vcenter_folder/tasks/main.yml | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/test/integration/targets/vcenter_folder/tasks/main.yml b/test/integration/targets/vcenter_folder/tasks/main.yml index 49980e0b1d..addba1d5ba 100644 --- a/test/integration/targets/vcenter_folder/tasks/main.yml +++ b/test/integration/targets/vcenter_folder/tasks/main.yml @@ -81,6 +81,23 @@ - host - datastore - network + +- name: Recreate all types of sub folder + vcenter_folder: + hostname: "{{ vcsim }}" + username: "{{ vcsim_instance.json.username }}" + password: "{{ vcsim_instance.json.password }}" + validate_certs: no + datacenter: "{{ dc1 }}" + folder_name: "sub_{{ item }}_folder" + parent_folder: 'vm_folder' + state: present + register: recreate_folders + with_items: + - vm + - host + - datastore + - network - debug: msg="{{ all_folder_results }}" @@ -88,6 +105,7 @@ assert: that: - all_folder_results.changed + - not recreate_folders.changed #- name: Delete all types of folder # vcenter_folder: |