ANSIBLE remove all SNAPSHOT ON VM TEMPT




[root@localhost ~]# cat snap.yml
---
- name: Create a VM

  hosts: localhost

  connection: local

  gather_facts: no

  tasks:
  - name: Create snapshot

    vmware_guest_snapshot:

      hostname: 192.168.0.107

      username: root

      password: vmware

      validate_certs: no

      datacenter: dc

      folder: /dc/vm

      name: tempt

      state: remove_all


    delegate_to: localhost

[root@localhost ~]# ansible-playbook snap.yml

PLAY [Create a VM] ********************************************************************

TASK [Create snapshot] ****************************************************************
changed: [localhost -> localhost]

PLAY RECAP ****************************************************************************
localhost                  : ok=1    changed=1    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0 

https://docs.google.com/document/d/e/2PACX-1vTydnFyI6AWeHoiljrcDFHmbf-f8mP7p_75CYLSwID8ZWaHattTR8XPRpT-DS8cTu_k-XI5YwQPTvqM/pub

Comments

Popular posts from this blog

ansible redhat cluster qorum qdevice

PE 3.9.0 on centos 6

gfs2 cluster