community / community.vmware / 1.18.2 / module / vmware_host_kernel_manager Manage kernel module options on ESXi hosts Authors: Aaron Longchamps (@alongchamps)community.vmware.vmware_host_kernel_manager (1.18.2) — module
Install with ansible-galaxy collection install community.vmware:==1.18.2
collections: - name: community.vmware version: 1.18.2
This module can be used to manage kernel module options on ESXi hosts.
All connected ESXi hosts in scope will be configured when specified.
If a host is not connected at time of configuration, it will be marked as such in the output.
Kernel module options may require a reboot to take effect which is not covered here.
You can use M(ansible.builtin.reboot) or M(community.vmware.vmware_host_powerstate) module to reboot all ESXi host systems.
- name: Configure IPv6 to be off via tcpip4 kernel module community.vmware.vmware_host_kernel_manager: hostname: '{{ vcenter_hostname }}' username: '{{ vcenter_username }}' password: '{{ vcenter_password }}' esxi_hostname: '{{ esxi_hostname }}' kernel_module_name: "tcpip4" kernel_module_option: "ipv6=0"
- name: Using cluster_name, configure vmw_psp_rr options community.vmware.vmware_host_kernel_manager: hostname: '{{ vcenter_hostname }}' username: '{{ vcenter_username }}' password: '{{ vcenter_password }}' cluster_name: '{{ virtual_cluster_name }}' kernel_module_name: "vmw_psp_rr" kernel_module_option: "maxPathsPerDevice=2"
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 C(VMWARE_PORT) will be used instead. - Environment variable support added in Ansible 2.6. 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 C(VMWARE_HOST) will be used instead. - Environment variable support added in Ansible 2.6. 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 C(VMWARE_PASSWORD) will be used instead. - Environment variable support added in Ansible 2.6. 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 C(VMWARE_USER) will be used instead. - Environment variable support added in Ansible 2.6. 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 C(VMWARE_PROXY_HOST) will be used instead. - This feature depends on a version of pyvmomi greater than v6.7.1.2018.12 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 C(VMWARE_PROXY_PORT) will be used instead. required: false type: int cluster_name: description: - Name of the VMware cluster to work on. - All ESXi hosts in this cluster will be configured. - This parameter is required if C(esxi_hostname) is not specified. type: str esxi_hostname: description: - Name of the ESXi host to work on. - This parameter is required if C(cluster_name) is not specified. type: str validate_certs: default: true description: - Allows connection when SSL certificates are not valid. Set to C(false) when certificates are not trusted. - If the value is not specified in the task, the value of environment variable C(VMWARE_VALIDATE_CERTS) will be used instead. - Environment variable support added in Ansible 2.6. - If set to C(true), please make sure Python >= 2.7.9 is installed on the given machine. type: bool kernel_module_name: description: - Name of the kernel module to be configured. required: true type: str kernel_module_option: description: - Specified configurations will be applied to the given module. - These values are specified in key=value pairs and separated by a space when there are multiple options. required: true type: str
host_kernel_status: description: - dict with information on what was changed, by ESXi host in scope. returned: success sample: results: myhost01.example.com: changed: true configured_options: ipv6=0 msg: Options have been changed on the kernel module original_options: ipv6=1 type: dict