Skip to content

Commit

Permalink
remove redundant libraryitems example modules
Browse files Browse the repository at this point in the history
  • Loading branch information
OrrBG committed Jan 12, 2025
1 parent 00b7a43 commit 0af1a44
Showing 1 changed file with 0 additions and 55 deletions.
55 changes: 0 additions & 55 deletions plugins/modules/vcenter_vmtemplate_libraryitems.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,52 +335,6 @@
"""

EXAMPLES = r"""
- name: Create a VM
vmware.vmware_rest.vcenter_vm:
placement:
cluster: "{{ lookup('vmware.vmware_rest.cluster_moid', '/my_dc/host/my_cluster') }}"
datastore: "{{ lookup('vmware.vmware_rest.datastore_moid', '/my_dc/datastore/local') }}"
folder: "{{ lookup('vmware.vmware_rest.folder_moid', '/my_dc/vm') }}"
resource_pool: "{{ lookup('vmware.vmware_rest.resource_pool_moid', '/my_dc/host/my_cluster/Resources') }}"
name: test_vm1
guest_OS: RHEL_7_64
hardware_version: VMX_11
memory:
hot_add_enabled: true
size_MiB: 1024
disks:
- type: SATA
backing:
type: VMDK_FILE
vmdk_file: '[local] test_vm1/{{ disk_name }}.vmdk'
- type: SATA
new_vmdk:
name: second_disk
capacity: 32000000000
cdroms:
- type: SATA
sata:
bus: 0
unit: 2
nics:
- backing:
type: STANDARD_PORTGROUP
network: "{{ lookup('vmware.vmware_rest.network_moid', '/my_dc/network/VM Network') }}"
register: my_vm
- name: Create a content library based on a DataStore
vmware.vmware_rest.content_locallibrary:
name: my_library_on_datastore
description: automated
publish_info:
published: true
authentication_method: NONE
storage_backings:
- datastore_id: "{{ lookup('vmware.vmware_rest.datastore_moid', '/my_dc/datastore/local') }}"
type: DATASTORE
state: present
register: nfs_lib
- name: Create a VM template on the library
vmware.vmware_rest.vcenter_vmtemplate_libraryitems:
name: golden-template
Expand All @@ -392,15 +346,6 @@
resource_pool: "{{ lookup('vmware.vmware_rest.resource_pool_moid', '/my_dc/host/my_cluster/Resources') }}"
register: mylib_item
- name: Get the list of items of the NFS library
vmware.vmware.content_library_item_info:
library_id: '{{ nfs_lib.id }}'
register: lib_items
- name: Use the name to identify the item
set_fact:
my_template_item: "{{ lib_items.value | selectattr('name', 'equalto', 'golden-template')|first }}"
- name: Deploy a new VM based on the template
vmware.vmware_rest.vcenter_vmtemplate_libraryitems:
name: vm-from-template
Expand Down

0 comments on commit 0af1a44

Please sign in to comment.