community.vmware.vmware_host_lockdown_exceptions (4.2.0) — module

Manage Lockdown Mode Exception Users

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

Authors: Mario Lenz (@mariolenz)

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 Lockdown Mode Exception Users.

All parameters and VMware objects values are case sensitive.

Please specify O(hostname) as vCenter IP or hostname only, as lockdown operations are not possible from standalone ESXi server.

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.
- name: Remove all Lockdown Mode Exception Users on a host
  community.vmware.vmware_host_lockdown:
    hostname: '{{ vcenter_hostname }}'
    username: '{{ vcenter_username }}'
    password: '{{ vcenter_password }}'
    esxi_hostname: '{{ esxi_hostname }}'
    exception_users: []
    state: set
  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

state:
    choices:
    - present
    - absent
    - set
    default: present
    description:
    - If V(present), make sure the given users are defined as Lockdown Mode Exception
      Users.
    - If V(absent), make sure the given users are NO Lockdown Mode Exception Users.
    - If V(set), will replace Lockdown Mode Exception Users defined list of users.
    type: str

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 systems from given cluster used to manage exception users.
    - Required parameter, if O(esxi_hostname) is not set.
    type: str

esxi_hostname:
    description:
    - List of ESXi hostname to manage exception users.
    - 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

exception_users:
    description:
    - List of Lockdown Mode Exception Users.
    - To remove all Exception Users, O(state=set) the empty list.
    elements: str
    required: true
    type: list

Outputs

results:
  description: metadata about exception users of Host systems
  returned: always
  sample:
    host_lockdown_exceptions:
      DC0_C0:
        current_exception_users: []
        desired_exception_users: []
        previous_exception_users:
        - root
  type: dict