This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: localhost | |
gather_facts: no | |
vars_files: | |
- vcenter_vars.yml | |
tasks: | |
- name: Create a DRS anti-affinity rule for Asia-Cluster1 | |
community.vmware.vmware_vm_vm_drs_rule: | |
validate_certs: False | |
hostname: '{{ vcenter_hostname }}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from bs4 import BeautifulSoup | |
import os | |
import shutil | |
url = "" | |
response = requests.get(url) | |
soup = BeautifulSoup(response.text, "html.parser") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pyVim.connect import SmartConnect, Disconnect | |
import ssl | |
import atexit | |
from pyVmomi import vim | |
# vim.vm.GuestOsDescriptor.GuestOsIdentifier | |
def connect(hostname, username, password, port): | |
context = ssl.SSLContext(ssl.PROTOCOL_SSLv23) | |
context.verify_mode = ssl.CERT_NONE |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pyVim.connect import SmartConnect, Disconnect | |
import ssl | |
import atexit | |
from pyVmomi import vim, vmodl, VmomiSupport | |
def connect(hostname, username, password, port): | |
context = ssl.SSLContext(ssl.PROTOCOL_SSLv23) | |
context.verify_mode = ssl.CERT_NONE | |
si = SmartConnect(host=hostname, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: localhost | |
gather_facts: no | |
tasks: | |
- name: Create category for backup | |
community.vmware.vmware_category: | |
category_name: "backup_category" | |
category_description: "Backup Category Description" | |
category_cardinality: "multiple" | |
associable_object_types: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: localhost | |
gather_facts: no | |
vars_files: | |
- vcenter_vars.yml | |
vars: | |
category_name: 'backup_category' | |
tag_name: 'backup_tag' | |
tasks: | |
- name: Create category first |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
- hosts: localhost | |
vars_files: | |
- vcenter_vars.yml | |
vars: | |
category_name: "backup_category" | |
tag_name: "backup_tag" | |
vm_name: "CentOS_8" | |
tasks: | |
- name: Assign tags to given virtual machine |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugin: community.general.virtualbox |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"_meta": { | |
"hostvars": { | |
"c7_default_1613391235539_81556": { | |
"vbox_2D_Video_Acceleration": "disabled", | |
"vbox_3D_Acceleration": "disabled", | |
"vbox_ACPI": "enabled", | |
"vbox_APIC": "enabled", | |
"vbox_Allow_Tracing_to_Access_VM": "disabled", | |
"vbox_Audio": "enabled (Driver: CoreAudio, Controller: AC97, Codec: STAC9700)", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
plugin: community.general.virtualbox | |
keyed_groups: | |
- key: vbox_Guest_OS | |
prefix: "" | |
separator: "" |