The vmware_host_firewall_manager module

This module lets you configure the firewall rules on your VMware ESXi hosts:

- name: set some firewall rules on the esxi hosts  vmware_host_firewall_manager:    hostname: "{{ vsphere_host }}"    username: "{{ vsphere_username }}"    password: "{{ vsphere_password }}"    validate_certs: "no"    esxi_hostname: "{{ inventory_hostname }}"    rules:      - name: "vvold"        enabled: "True"      - name: "CIMHttpServer"        enabled: "False"

The previous example enables vvold and disables CIMHttpServer on each of the VMware ESXi hosts in the host inventory.

Get Learn Ansible now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.