community / community.general / 0.1.1 / module / cs_staticnat Manages static NATs on Apache CloudStack based clouds. Authors: René Moser (@resmo) stableinterface | supported by communitycommunity.general.cs_staticnat (0.1.1) — module
Install with ansible-galaxy collection install community.general:==0.1.1
collections: - name: community.general version: 0.1.1
Create, update and remove static NATs.
- name: Create a static NAT for IP 1.2.3.4 to web01 cs_staticnat: ip_address: 1.2.3.4 vm: web01 delegate_to: localhost
- name: Remove a static NAT cs_staticnat: ip_address: 1.2.3.4 state: absent delegate_to: localhost
vm: description: - Name of virtual machine which we make the static NAT for. - Required if I(state=present). type: str vpc: description: - VPC the network related to. type: str zone: description: - Name of the zone in which the virtual machine is in. - If not set, default zone is used. type: str state: choices: - present - absent default: present description: - State of the static NAT. type: str domain: description: - Domain the static NAT is related to. type: str account: description: - Account the static NAT is related to. type: str api_key: description: - API key of the CloudStack API. - If not given, the C(CLOUDSTACK_KEY) env variable is considered. - As the last option, the value is taken from the ini config file, also see the notes. type: str api_url: description: - URL of the CloudStack API e.g. https://cloud.example.com/client/api. - If not given, the C(CLOUDSTACK_ENDPOINT) env variable is considered. - As the last option, the value is taken from the ini config file, also see the notes. type: str network: description: - Network the IP address is related to. type: str project: description: - Name of the project the static NAT is related to. type: str api_region: default: cloudstack description: - Name of the ini section in the C(cloustack.ini) file. - If not given, the C(CLOUDSTACK_REGION) env variable is considered. type: str api_secret: description: - Secret key of the CloudStack API. - If not set, the C(CLOUDSTACK_SECRET) env variable is considered. - As the last option, the value is taken from the ini config file, also see the notes. type: str ip_address: description: - Public IP address the static NAT is assigned to. required: true type: str poll_async: default: true description: - Poll async jobs until job has finished. type: bool api_timeout: description: - HTTP timeout in seconds. - If not given, the C(CLOUDSTACK_TIMEOUT) env variable is considered. - As the last option, the value is taken from the ini config file, also see the notes. - Fallback value is 10 seconds if not specified. type: int vm_guest_ip: description: - VM guest NIC secondary IP address for the static NAT. type: str api_http_method: choices: - get - post description: - HTTP method used to query the API endpoint. - If not given, the C(CLOUDSTACK_METHOD) env variable is considered. - As the last option, the value is taken from the ini config file, also see the notes. - Fallback value is C(get) if not specified. type: str
account: description: Account the static NAT is related to. returned: success sample: example account type: str domain: description: Domain the static NAT is related to. returned: success sample: example domain type: str id: description: UUID of the ip_address. returned: success sample: a6f7a5fc-43f8-11e5-a151-feff819cdc9f type: str ip_address: description: Public IP address. returned: success sample: 1.2.3.4 type: str project: description: Name of project the static NAT is related to. returned: success sample: Production type: str vm_display_name: description: Display name of the virtual machine. returned: success sample: web-01 type: str vm_guest_ip: description: IP of the virtual machine. returned: success sample: 10.101.65.152 type: str vm_name: description: Name of the virtual machine. returned: success sample: web-01 type: str zone: description: Name of zone the static NAT is related to. returned: success sample: ch-gva-2 type: str