community / community.vmware / 2.10.4 / module / vca_nat
Removed in None
Reason:Module depends upon deprecated version of Pyvcloud library. | Alternative:Use U(https://github.com/vmware/ansible-module-vcloud-director) instead.
add remove nat rules in a gateway in a vca
Authors: Peter Sprygada (@privateip)
Install with ansible-galaxy collection install community.vmware:==2.10.4
collections: - name: community.vmware version: 2.10.4
Adds or removes nat rules from a gateway in a vca environment
#An example for a source nat - hosts: localhost connection: local tasks: - community.vmware.vca_nat: instance_id: 'b15ff1e5-1024-4f55-889f-ea0209726282' vdc_name: 'benz_ansible' state: 'present' nat_rules: - rule_type: SNAT original_ip: 192.0.2.42 translated_ip: 203.0.113.23
#example for a DNAT - hosts: localhost connection: local tasks: - community.vmware.vca_nat: instance_id: 'b15ff1e5-1024-4f55-889f-ea0209726282' vdc_name: 'benz_ansible' state: 'present' nat_rules: - rule_type: DNAT original_ip: 203.0.113.23 original_port: 22 translated_ip: 192.0.2.42 translated_port: 22
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 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 nat_rules: default: false description: - A list of rules to be added to the gateway, Please see examples on valid entries required: true 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 purge_rules: default: false description: - If set to true, it will delete all rules in the gateway that are not given as parameter to this module. type: bool 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