ngine_io.cloudstack.cs_portforward – Manages port forwarding rules on Apache CloudStack based clouds.¶
Note
This plugin is part of the ngine_io.cloudstack collection (version 2.1.0).
To install it use: ansible-galaxy collection install ngine_io.cloudstack
.
To use it in a playbook, specify: ngine_io.cloudstack.cs_portforward
.
New in version 0.1.0: of ngine_io.cloudstack
Requirements¶
The below requirements are needed on the host that executes this module.
python >= 2.6
cs >= 0.9.0
Parameters¶
Notes¶
Note
A detailed guide about cloudstack modules can be found in the CloudStack Cloud Guide.
This module supports check mode.
Examples¶
- name: 1.2.3.4:80 -> web01:8080
ngine_io.cloudstack.cs_portforward:
ip_address: 1.2.3.4
zone: zone01
vm: web01
public_port: 80
private_port: 8080
- name: forward SSH and open firewall
ngine_io.cloudstack.cs_portforward:
ip_address: '{{ public_ip }}'
zone: zone01
vm: '{{ inventory_hostname }}'
public_port: '{{ ansible_ssh_port }}'
private_port: 22
open_firewall: true
- name: forward DNS traffic, but do not open firewall
ngine_io.cloudstack.cs_portforward:
ip_address: 1.2.3.4
zone: zone01
vm: '{{ inventory_hostname }}'
public_port: 53
private_port: 53
protocol: udp
- name: remove ssh port forwarding
ngine_io.cloudstack.cs_portforward:
ip_address: 1.2.3.4
zone: zone01
public_port: 22
private_port: 22
state: absent
- name: forward SSH in backend tier of VPC
ngine_io.cloudstack.cs_portforward:
ip_address: '{{ public_ip }}'
zone: zone01
vm: '{{ inventory_hostname }}'
public_port: '{{ ansible_ssh_port }}'
private_port: 22
vpc: myVPC
network: backend
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
René Moser (@resmo)