Deprecated

Removed in None

i

Reason:Module depends upon deprecated version of Pyvcloud library. | Alternative:Use U(https://github.com/vmware/ansible-module-vcloud-director) instead.

community.vmware.vca_fw (2.10.4) — module

add remove firewall rules in a gateway in a vca

Authors: Peter Sprygada (@privateip)

Install collection

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


Add to requirements.yml

  collections:
    - name: community.vmware
      version: 2.10.4

Description

Adds or removes firewall rules from a gateway in a vca environment

Usage examples

  • Success
    Steampunk Spotter scan finished with no errors, warnings or hints.

#Add a set of firewall rules

- hosts: localhost
  connection: local
  tasks:
   - community.vmware.vca_fw:
       instance_id: 'b15ff1e5-1024-4f55-889f-ea0209726282'
       vdc_name: 'benz_ansible'
       fw_rules:
         - description: "ben testing"
           source_ip: "Any"
           dest_ip: 192.0.2.23
         - description: "ben testing 2"
           source_ip: 192.0.2.50
           source_port: "Any"
           dest_port: "22"
           dest_ip: 192.0.2.101
           is_enable: "true"
           enable_logging: "false"
           protocol: "Tcp"
           policy: "allow"

Inputs

    
org:
    description:
    - The org to login to for creating vapp.
    - This option is required when the C(service_type) is I(vdc).
    type: str

host:
    description:
    - The authentication host to be used when service type is vcd.
    type: str

state:
    choices:
    - absent
    - present
    default: present
    description:
    - Whether the object should be added or removed.
    type: str

fw_rules:
    default: false
    description:
    - A list of firewall rules to be added to the gateway, Please see examples on valid
      entries
    required: true

password:
    aliases:
    - pass
    - passwd
    description:
    - The vca password, if not set the environment variable C(VCA_PASS) is checked for
      the password.
    type: str

username:
    aliases:
    - user
    description:
    - The vca username or email address, if not set the environment variable C(VCA_USER)
      is checked for the username.
    type: str

vdc_name:
    description:
    - The name of the vdc where the gateway is located.
    type: str

api_version:
    default: '5.7'
    description:
    - The API version to be used with the vca.
    type: str

instance_id:
    description:
    - The instance ID in a vchs environment to be used for creating the vapp.
    type: str

gateway_name:
    default: gateway
    description:
    - The name of the gateway of the vdc where the rule should be added.
    type: str

service_type:
    choices:
    - vca
    - vcd
    - vchs
    default: vca
    description:
    - The type of service we are authenticating against.
    type: str

validate_certs:
    aliases:
    - verify_certs
    default: true
    description:
    - If the certificates of the authentication is to be verified.
    type: bool