|
|
@ -2,91 +2,89 @@
|
|
|
|
# Copyright: (c) 2019, Abhijeet Kasurde <akasurde@redhat.com>
|
|
|
|
# Copyright: (c) 2019, Abhijeet Kasurde <akasurde@redhat.com>
|
|
|
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
|
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
|
|
|
|
|
|
|
|
|
|
- when: vcsim is not defined
|
|
|
|
- name: Create different types of category with associable object types
|
|
|
|
block:
|
|
|
|
vmware_category:
|
|
|
|
- name: Create different types of category with associable object types
|
|
|
|
hostname: '{{ vcenter_hostname }}'
|
|
|
|
vmware_category:
|
|
|
|
username: '{{ vcenter_username }}'
|
|
|
|
hostname: '{{ vcenter_hostname }}'
|
|
|
|
password: '{{ vcenter_password }}'
|
|
|
|
username: '{{ vcenter_username }}'
|
|
|
|
validate_certs: False
|
|
|
|
password: '{{ vcenter_password }}'
|
|
|
|
category_name: '{{ item }} name'
|
|
|
|
validate_certs: False
|
|
|
|
category_description: '{{ item }} description'
|
|
|
|
category_name: '{{ item }} name'
|
|
|
|
associable_object_types:
|
|
|
|
category_description: '{{ item }} description'
|
|
|
|
- "{{ item }}"
|
|
|
|
associable_object_types:
|
|
|
|
state: present
|
|
|
|
- "{{ item }}"
|
|
|
|
with_items:
|
|
|
|
state: present
|
|
|
|
- All objects
|
|
|
|
with_items:
|
|
|
|
- Folder
|
|
|
|
- All objects
|
|
|
|
- Cluster
|
|
|
|
- Folder
|
|
|
|
- Datacenter
|
|
|
|
- Cluster
|
|
|
|
- Datastore
|
|
|
|
- Datacenter
|
|
|
|
- Datastore Cluster
|
|
|
|
- Datastore
|
|
|
|
- Distributed Port Group
|
|
|
|
- Datastore Cluster
|
|
|
|
- Distributed Switch
|
|
|
|
- Distributed Port Group
|
|
|
|
- Host
|
|
|
|
- Distributed Switch
|
|
|
|
- Content Library
|
|
|
|
- Host
|
|
|
|
- Library item
|
|
|
|
- Content Library
|
|
|
|
- Network
|
|
|
|
- Library item
|
|
|
|
- Resource Pool
|
|
|
|
- Network
|
|
|
|
- vApp
|
|
|
|
- Resource Pool
|
|
|
|
- Virtual Machine
|
|
|
|
- vApp
|
|
|
|
|
|
|
|
- Virtual Machine
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Delete different types of category with associable object types
|
|
|
|
- name: Delete different types of category with associable object types
|
|
|
|
vmware_category:
|
|
|
|
vmware_category:
|
|
|
|
hostname: '{{ vcenter_hostname }}'
|
|
|
|
hostname: '{{ vcenter_hostname }}'
|
|
|
|
username: '{{ vcenter_username }}'
|
|
|
|
username: '{{ vcenter_username }}'
|
|
|
|
password: '{{ vcenter_password }}'
|
|
|
|
password: '{{ vcenter_password }}'
|
|
|
|
validate_certs: False
|
|
|
|
validate_certs: False
|
|
|
|
category_name: '{{ item }} name'
|
|
|
|
category_name: '{{ item }} name'
|
|
|
|
state: absent
|
|
|
|
state: absent
|
|
|
|
with_items:
|
|
|
|
with_items:
|
|
|
|
- All objects
|
|
|
|
- All objects
|
|
|
|
- Folder
|
|
|
|
- Folder
|
|
|
|
- Cluster
|
|
|
|
- Cluster
|
|
|
|
- Datacenter
|
|
|
|
- Datacenter
|
|
|
|
- Datastore
|
|
|
|
- Datastore
|
|
|
|
- Datastore Cluster
|
|
|
|
- Datastore Cluster
|
|
|
|
- Distributed Port Group
|
|
|
|
- Distributed Port Group
|
|
|
|
- Distributed Switch
|
|
|
|
- Distributed Switch
|
|
|
|
- Host
|
|
|
|
- Host
|
|
|
|
- Content Library
|
|
|
|
- Content Library
|
|
|
|
- Library item
|
|
|
|
- Library item
|
|
|
|
- Network
|
|
|
|
- Network
|
|
|
|
- Resource Pool
|
|
|
|
- Resource Pool
|
|
|
|
- vApp
|
|
|
|
- vApp
|
|
|
|
- Virtual Machine
|
|
|
|
- Virtual Machine
|
|
|
|
|
|
|
|
|
|
|
|
- name: Create category with 2 associable object types
|
|
|
|
- name: Create category with 2 associable object types
|
|
|
|
vmware_category:
|
|
|
|
vmware_category:
|
|
|
|
hostname: '{{ vcenter_hostname }}'
|
|
|
|
hostname: '{{ vcenter_hostname }}'
|
|
|
|
username: '{{ vcenter_username }}'
|
|
|
|
username: '{{ vcenter_username }}'
|
|
|
|
password: '{{ vcenter_password }}'
|
|
|
|
password: '{{ vcenter_password }}'
|
|
|
|
validate_certs: False
|
|
|
|
validate_certs: False
|
|
|
|
category_name: 'Sample_cate_0001'
|
|
|
|
category_name: 'Sample_cate_0001'
|
|
|
|
category_description: 'sample description'
|
|
|
|
category_description: 'sample description'
|
|
|
|
associable_object_types:
|
|
|
|
associable_object_types:
|
|
|
|
- Datastore
|
|
|
|
- Datastore
|
|
|
|
- Cluster
|
|
|
|
- Cluster
|
|
|
|
state: present
|
|
|
|
state: present
|
|
|
|
register: category_change
|
|
|
|
register: category_change
|
|
|
|
|
|
|
|
|
|
|
|
- name: Assert change is made
|
|
|
|
- name: Assert change is made
|
|
|
|
assert:
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
- category_change.changed
|
|
|
|
- category_change.changed
|
|
|
|
|
|
|
|
|
|
|
|
- name: Delete category with 2 associable object types
|
|
|
|
- name: Delete category with 2 associable object types
|
|
|
|
vmware_category:
|
|
|
|
vmware_category:
|
|
|
|
hostname: '{{ vcenter_hostname }}'
|
|
|
|
hostname: '{{ vcenter_hostname }}'
|
|
|
|
username: '{{ vcenter_username }}'
|
|
|
|
username: '{{ vcenter_username }}'
|
|
|
|
password: '{{ vcenter_password }}'
|
|
|
|
password: '{{ vcenter_password }}'
|
|
|
|
validate_certs: False
|
|
|
|
validate_certs: False
|
|
|
|
category_name: 'Sample_cate_0001'
|
|
|
|
category_name: 'Sample_cate_0001'
|
|
|
|
state: absent
|
|
|
|
state: absent
|
|
|
|
register: category_change
|
|
|
|
register: category_change
|
|
|
|
|
|
|
|
|
|
|
|
- name: Assert change is made
|
|
|
|
- name: Assert change is made
|
|
|
|
assert:
|
|
|
|
assert:
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
- category_change.changed
|
|
|
|
- category_change.changed
|
|
|
|