From e6cf7bf77293e164919639c0c356bd41c986db18 Mon Sep 17 00:00:00 2001 From: "rafael@valletech.eu" Date: Mon, 14 Sep 2020 10:45:49 +0200 Subject: [PATCH 1/3] added some clarifications/examples regarding port forwards of VPC tiers --- plugins/modules/cs_portforward.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/plugins/modules/cs_portforward.py b/plugins/modules/cs_portforward.py index eb74d1cc..3ba9fec4 100644 --- a/plugins/modules/cs_portforward.py +++ b/plugins/modules/cs_portforward.py @@ -62,6 +62,7 @@ open_firewall: description: - Whether the firewall rule for public port should be created, while creating the new rule. + - Not supported when forwarding ports in an VPC. - Use M(cs_firewall) for managing firewall rules. default: no type: bool @@ -71,7 +72,7 @@ type: str network: description: - - Name of the network. + - Name of the network/vpc tier. Required when forwarding the first port of an VPC tier. type: str vpc: description: @@ -140,6 +141,15 @@ 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 }}' + vm: '{{ inventory_hostname }}' + public_port: '{{ ansible_ssh_port }}' + private_port: 22 + vpc: myVPC + network: backend ''' RETURN = ''' From 52cb32d8ebc6268f29a1960a1abd3aa2c5993dd3 Mon Sep 17 00:00:00 2001 From: "rafael@valletech.eu" Date: Mon, 14 Sep 2020 11:01:27 +0200 Subject: [PATCH 2/3] making mr pep happy --- plugins/modules/cs_portforward.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/cs_portforward.py b/plugins/modules/cs_portforward.py index 3ba9fec4..3dea1c46 100644 --- a/plugins/modules/cs_portforward.py +++ b/plugins/modules/cs_portforward.py @@ -141,7 +141,7 @@ 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 }}' From f3b6c7d7feab650534da886d009afab29f1c0e17 Mon Sep 17 00:00:00 2001 From: "rafael@valletech.eu" Date: Fri, 18 Sep 2020 18:56:35 +0200 Subject: [PATCH 3/3] wording --- plugins/modules/cs_portforward.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/modules/cs_portforward.py b/plugins/modules/cs_portforward.py index 3dea1c46..3c80ccbb 100644 --- a/plugins/modules/cs_portforward.py +++ b/plugins/modules/cs_portforward.py @@ -62,7 +62,7 @@ open_firewall: description: - Whether the firewall rule for public port should be created, while creating the new rule. - - Not supported when forwarding ports in an VPC. + - Not supported when forwarding ports in a VPC. - Use M(cs_firewall) for managing firewall rules. default: no type: bool @@ -72,7 +72,7 @@ type: str network: description: - - Name of the network/vpc tier. Required when forwarding the first port of an VPC tier. + - Name of the network. Required when forwarding ports in a VPC. type: str vpc: description: