Monday, September 4, 2017

Removing a VM on ESXi standalone with Ansible

The pysphere Python package must be installed.

  connection: local
  user: username
  sudo: false
  gather_facts: false
  serial: 1

    - vsphere_guest: 
        vcenter_hostname: <<ESXi-IP>> 
        username: root 
        password: <<password>>
          datacenter: ha-datacenter
        guest: <<virtual-machine-name>>
        state: absent
        force: yes
        validate_certs: false

No comments:

Post a Comment