Skip to main content

Molecule VMware Plugin

molecule-vmware-ci

Molecule VMware is designed to allow use of VMware vSphere environment for provisioning test resources.
Please note that this driver is currently in its early stage of development.

Installation and Usage

Install molecule-vmware and pre-requisites:

pip install molecule-vmware ansible pyvmomi

Please also install pywinrm if you want to use Windows in test instance.

pip install pywinrm

Create a new role with molecule using the vmware driver:

molecule init role <role_name> -d vmware

Configure <role_name>/molecule/default/molecule.yml with required parameters based on your vSphere environment.
A simple config is:

dependency:
  name: galaxy
driver:
  name: vmware
  vcenter_hostname: vcsa.local
  vcenter_username: administrator@vsphere.local
  vcenter_password: secret
  validate_certs: false
  datacenter: dc
  #esxi_hostname: change me to esxi hostname of deploying an instance. need it if not cluster specified
  cluster: cluster01
  folder: /vm/example
  vm_username: root
  vm_password: secret
  instance_os_type: linux # is possible only specify [linux or windows]
  # The below are possible parameters to be specified if using the windows template.
  #winrm_port: 5986 # is WinRM port
  #connection: winrm # is the connection type
  #winrm_transport: ntlm # is the authentication type
  #winrm_server_cert_validation: ignore # is the server certificate validation mode
  # The below list is possible to define DNS nameservers
  #dns_servers:
  #  - "8.8.8.8"
  #  - "8.8.4.4"
platforms:
  - name: instance1
    template: CentOS7
    hardware:
      num_cpus: 2
      memory_mb: 2048
    networks:
      - name: VM Network
        type: dhcp
  - name: instance2
    template: CentOS8
    snapshot_src: linked_clone # is a snapshot name to be possible specified if you want to use linked clone.
    resource_pool: rpool # is a resource pool to be possible specified
    hardware:
      num_cpus: 2
      memory_mb: 2048
    networks:
      - name: VM Network
        ip: 100.64.0.2
        netmask: 255.255.255.0
        gateway: 100.64.0.1
    # The below are possible parameters to be specified if using the windows template.
    #customization:
    #  fullname: molecule # is the server owner name
    #  orgname: molecule # is the organization name
provisioner:
  name: ansible
verifier:
  name: ansible

Template requirements

A template requires vmware tools because it is done Sysprep or Linuxprep to initialize OS.
When Linux, please also install Perl to the template.

License

The MIT License.

Metadata

Release files for molecule-vmware 0.3.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for molecule-vmware 0.3.6
File Size Uploaded
molecule-vmware-0.3.6.tar.gz 9.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for molecule-vmware 0.3.6
File Interpreter ABI Platform
molecule_vmware-0.3.6-py3-none-any.whl Python 3 none any Details

Total release size: 22.1 kB

Release files / molecule-vmware-0.3.6.tar.gz

Download URL molecule-vmware-0.3.6.tar.gz
Size 9.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c8f9e8a80068a0856d076d750e441ae3b5153cf28847b1f807aa508aefea7318
BLAKE2b-256 checksum
How to use checksums
4faea992bf7cd94a7b1b96a1408732ca124b634270fcb8518fc5f1541ea093fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.6.8

Release files / molecule_vmware-0.3.6-py3-none-any.whl

Download URL molecule_vmware-0.3.6-py3-none-any.whl
Size 12.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ba0e549a38f6d7b163ce71c5a49b880427184f4169e7a6cbb6e8eac62bb0e8c6
BLAKE2b-256 checksum
How to use checksums
45d6d35a22e233fee5a0a6817fbf9392393ac2f65b7a4ee23f6623e2f09e2838
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/52.0.0 requests-toolbelt/0.9.1 tqdm/4.55.1 CPython/3.6.8

Release history Release notifications | RSS feed

This release

0.3.6 This release

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.4

2 release files

0.2.3

2 release files

0.2.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page