Documentation

vca_nat - add remove nat rules in a gateway in a vca

New in version 2.0.

Synopsis

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

Options

parameter required default choices comments
api_version
no 5.7
    The api version to be used with the vca
    gateway_name
    no gateway
      The name of the gateway of the vdc where the rule should be added
      host
      no None
        The authentication host to be used when service type is vcd.
        instance_id
        no None
          The instance id in a vchs environment to be used for creating the vapp
          nat_rules
          yes
            A list of rules to be added to the gateway, Please see examples on valid entries
            org
            no None
              The org to login to for creating vapp, mostly set when the service_type is vdc.
              password
              no None
                The vca password, if not set the environment variable VCA_PASS is checked for the password

                aliases: pass, pwd
                purge_rules
                no
                  If set to true, it will delete all rules in the gateway that are not given as paramter to this module.
                  service_type
                  no vca
                  • vca
                  • vchs
                  • vcd
                  The type of service we are authenticating against
                  state
                  no present
                  • present
                  • absent
                  if the object should be added or removed
                  username
                  no None
                    The vca username or email address, if not set the environment variable VCA_USER is checked for the username.

                    aliases: user
                    vdc_name
                    no None
                      The name of the vdc where the gateway is located.
                      verify_certs
                      no True
                        If the certificates of the authentication is to be verified

                        Examples

                        #An example for a source nat
                        
                        - hosts: localhost
                          connection: local
                          tasks:
                           - vca_nat:
                               instance_id: 'b15ff1e5-1024-4f55-889f-ea0209726282'
                               vdc_name: 'benz_ansible'
                               state: 'present'
                               nat_rules:
                                 - rule_type: SNAT
                                   original_ip: 192.168.2.10
                                   translated_ip: 107.189.95.208
                        
                        #example for a DNAT
                        - hosts: localhost
                          connection: local
                          tasks:
                           - vca_nat:
                               instance_id: 'b15ff1e5-1024-4f55-889f-ea0209726282'
                               vdc_name: 'benz_ansible'
                               state: 'present'
                               nat_rules:
                                 - rule_type: DNAT
                                   original_ip: 107.189.95.208
                                   original_port: 22
                                   translated_ip: 192.168.2.10
                                   translated_port: 22
                        

                        This is an Extras Module

                        For more information on what this means please read Extras Modules

                        For help in developing on modules, should you be so inclined, please read Community Information & Contributing, Helping Testing PRs and Developing Modules.