community.vmware.vmware_host_logbundle (4.2.0) — module

Fetch logbundle file from ESXi

Authors: sky-joker (@sky-joker)

Install collection

Install with ansible-galaxy collection install community.vmware:==4.2.0


Add to requirements.yml

  collections:
    - name: community.vmware
      version: 4.2.0

Description

This module can be used to fetch logbundle file from ESXi.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: fetch logbundle file from ESXi
  community.vmware.vmware_host_logbundle:
    hostname: "{{ vcenter_hostname }}"
    username: "{{ vcenter_username }}"
    password: "{{ vcenter_password }}"
    esxi_hostname: "{{ esxi_hostname }}"
    dest: ./esxi-log.tgz
  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: fetch logbundle file from ESXi with manifests
  community.vmware.vmware_host_logbundle:
    hostname: "{{ vcenter_hostname }}"
    username: "{{ vcenter_username }}"
    password: "{{ vcenter_password }}"
    esxi_hostname: "{{ esxi_hostname }}"
    dest: ./esxi-log.tgz
    manifests:
      - System:Base
      - VirtualMachines:VirtualMachineStats

Inputs

    
dest:
    description:
    - file destination on localhost, path must be exist.
    required: true
    type: str

port:
    default: 443
    description:
    - The port number of the vSphere vCenter or ESXi server.
    - If the value is not specified in the task, the value of environment variable E(VMWARE_PORT)
      will be used instead.
    type: int

hostname:
    description:
    - The hostname or IP address of the vSphere vCenter or ESXi server.
    - If the value is not specified in the task, the value of environment variable E(VMWARE_HOST)
      will be used instead.
    type: str

password:
    aliases:
    - pass
    - pwd
    description:
    - The password of the vSphere vCenter or ESXi server.
    - If the value is not specified in the task, the value of environment variable E(VMWARE_PASSWORD)
      will be used instead.
    type: str

username:
    aliases:
    - admin
    - user
    description:
    - The username of the vSphere vCenter or ESXi server.
    - If the value is not specified in the task, the value of environment variable E(VMWARE_USER)
      will be used instead.
    type: str

manifests:
    default:
    - System:Base
    - System:CoreDumps
    - System:EsxImage
    - System:IOFilter
    - System:LoadESX
    - System:Modules
    - System:RDMA
    - System:ResourceGroups
    - System:TPM
    - System:VFlash
    - System:VMTools
    - System:VmiofPlugins
    - System:ntp
    - System:uwstats
    - Fcd:Catalog
    - VirtualMachines:CoreDumps
    - VirtualMachines:VirtualMachineStats
    - VirtualMachines:base
    - VirtualMachines:base
    - VirtualMachines:diskinfo
    - VirtualMachines:logs
    - Storage:FCoE
    - Storage:Multipathing
    - Storage:NAS
    - Storage:VSAN
    - Storage:VSANHealth
    - Storage:VSANIscsiTarget
    - Storage:VSANPerfStats
    - Storage:VSANPerfSvc
    - Storage:VSANTraces
    - Storage:VVOL
    - Storage:base
    - Storage:iodm
    - Storage:iscsi
    - FeatureStateSwitch:FeatureStateSwitch
    - Userworld:HostAgent
    - Userworld:ProcessInformation
    - Configuration:System
    - Logs:System
    - hostProfiles:SystemImageCacheHostProfile
    - hostProfiles:hostProfiles
    - FileSystem:VMFSDiskDump
    - FileSystem:base
    - ActiveDirectory:base
    - CIM:base
    - Hardware:base
    - Hardware:usb
    - Installer:base
    - Network:base
    - Network:dvs
    - Network:lacp
    - Network:nscd
    - Network:tcpip
    - IntegrityChecks:md5sums
    description:
    - Logs to include in the logbundle file.
    - Refer to the id key of the M(community.vmware.vmware_host_logbundle_info) module
      for values that can be specified in the manifest.
    elements: str
    required: false
    type: list

proxy_host:
    description:
    - Address of a proxy that will receive all HTTPS requests and relay them.
    - The format is a hostname or a IP.
    - If the value is not specified in the task, the value of environment variable E(VMWARE_PROXY_HOST)
      will be used instead.
    required: false
    type: str

proxy_port:
    description:
    - Port of the HTTP proxy that will receive all HTTPS requests and relay them.
    - If the value is not specified in the task, the value of environment variable E(VMWARE_PROXY_PORT)
      will be used instead.
    required: false
    type: int

esxi_hostname:
    description:
    - Name of the host system to fetch the logbundle.
    required: true
    type: str

validate_certs:
    default: true
    description:
    - Allows connection when SSL certificates are not valid. Set to V(false) when certificates
      are not trusted.
    - If the value is not specified in the task, the value of environment variable E(VMWARE_VALIDATE_CERTS)
      will be used instead.
    type: bool

performance_data:
    description:
    - Gather performance data for ESXi.
    required: false
    suboptions:
      duration:
        default: 300
        description:
        - Duration for which performance data is gathered.
        type: int
      interval:
        default: 5
        description:
        - Interval for which performance data is gathered.
        type: int
    type: dict

Outputs

dest:
  description: saved path of a logbundle file for ESXi
  returned: on success
  sample:
    changed: true
    dest: ./esxi-log.tgz
    failed: false
    gid: 0
    group: root
    mode: '0644'
    owner: root
    size: 25783140
    state: file
    uid: 0
  type: str