community.vmware.vmware_host_graphics (4.2.0) — module

Manage Host Graphic Settings

| "added in version" 3.10.0 of community.vmware"

Authors: Alexander Nikitin (@ihumster)

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 manage Host Graphic Settings

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Change Host Graphics Settings
  community.vmware.vmware_host_graphics:
    hostname: '{{ vcenter_hostname }}'
    username: '{{ vcenter_username }}'
    password: '{{ vcenter_password }}'
    esxi_hostname: '{{ esxi_hostname }}'
    graphic_type: sharedDirect
    assigment_policy: consolidation
  delegate_to: localhost

Inputs

    
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

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

cluster_name:
    description:
    - Name of cluster.
    - All host system from given cluster used to manage Host Graphic Settings.
    - Required parameter, if O(esxi_hostname) is not set.
    type: str

graphic_type:
    choices:
    - shared
    - sharedDirect
    default: shared
    description:
    - Default graphics type
    type: str

restart_xorg:
    default: false
    description:
    - Restart X.Org Server after change any parameter ( O(graphic_type) or O(assigment_policy)
      )
    type: bool

esxi_hostname:
    description:
    - List of ESXi hostname to manage Host Graphic Settings.
    - Required parameter, if O(cluster_name) is not set.
    elements: str
    type: list

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

assigment_policy:
    choices:
    - consolidation
    - performance
    default: performance
    description:
    - Shared passthrough GPU assignment policy
    type: str

Outputs

results:
  description:
  - data about host system graphics settings.
  returned: always
  sample:
    changed: true
    esxi01:
      changed: false
      msg: All Host Graphics Settings already configured
    esxi02:
      changed: true
      msg: 'New host graphics settings changed to: hostDefaultGraphicsType = ''shared'',
        sharedPassthruAssignmentPolicy = ''performance''.X.Org was restarted'
  type: dict