theko2fi.multipass.multipass_vm_purge (0.3.0) — module

Purge all deleted Multipass virtual machines permanently

| "added in version" 0.2.0 of theko2fi.multipass"

Authors: Kenneth KOFFI (@theko2fi)

Install collection

Install with ansible-galaxy collection install theko2fi.multipass:==0.3.0


Add to requirements.yml

  collections:
    - name: theko2fi.multipass
      version: 0.3.0

Description

Purge all deleted Multipass instances permanently, including all their data.

This will destroy all the traces of the virtual machine, and cannot be undone.

Performs the same function as the C(multipass purge) CLI subcommand.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Purge all the deleted virtual machines
  theko2fi.multipass.multipass_vm_purge:
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.

# Purge and show the result
- name: Purge all the deleted virtual machines
  theko2fi.multipass.multipass_vm_purge:
  register: result
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Display the list of purged virtual machines
  debug:
    var: result.vm_purged

Outputs

vm_purged:
  description:
  - List of purged virtual machines.
  elements: dict
  returned: always
  sample:
  - ipv4: []
    name: ansible-multipass-vm-cbc2f266
    release: Not Available
    state: Deleted
  type: list