mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
cs_vpc: fix network_domain param ignored (#35690)
This commit is contained in:
parent
196f2f382b
commit
c6f397b160
2 changed files with 8 additions and 0 deletions
|
@ -35,6 +35,7 @@ options:
|
||||||
description:
|
description:
|
||||||
- "Network domain for the VPC."
|
- "Network domain for the VPC."
|
||||||
- "All networks inside the VPC will belong to this domain."
|
- "All networks inside the VPC will belong to this domain."
|
||||||
|
- "Only considered while creating the VPC, can not be changed."
|
||||||
vpc_offering:
|
vpc_offering:
|
||||||
description:
|
description:
|
||||||
- "Name of the VPC offering."
|
- "Name of the VPC offering."
|
||||||
|
@ -265,6 +266,7 @@ class AnsibleCloudStackVpc(AnsibleCloudStack):
|
||||||
args = {
|
args = {
|
||||||
'name': self.module.params.get('name'),
|
'name': self.module.params.get('name'),
|
||||||
'displaytext': self.get_or_fallback('display_text', 'name'),
|
'displaytext': self.get_or_fallback('display_text', 'name'),
|
||||||
|
'networkdomain': self.module.params.get('network_domain'),
|
||||||
'vpcofferingid': self.get_vpc_offering(key='id'),
|
'vpcofferingid': self.get_vpc_offering(key='id'),
|
||||||
'cidr': self.module.params.get('cidr'),
|
'cidr': self.module.params.get('cidr'),
|
||||||
'account': self.get_account(key='name'),
|
'account': self.get_account(key='name'),
|
||||||
|
|
|
@ -53,6 +53,7 @@
|
||||||
display_text: "{{ cs_resource_prefix }}_display_text_custom"
|
display_text: "{{ cs_resource_prefix }}_display_text_custom"
|
||||||
cidr: 10.10.1.0/16
|
cidr: 10.10.1.0/16
|
||||||
vpc_offering: Redundant VPC offering
|
vpc_offering: Redundant VPC offering
|
||||||
|
network_domain: test.example.com
|
||||||
zone: "{{ cs_common_zone_adv }}"
|
zone: "{{ cs_common_zone_adv }}"
|
||||||
register: vpc
|
register: vpc
|
||||||
check_mode: true
|
check_mode: true
|
||||||
|
@ -68,6 +69,7 @@
|
||||||
display_text: "{{ cs_resource_prefix }}_display_text_custom"
|
display_text: "{{ cs_resource_prefix }}_display_text_custom"
|
||||||
cidr: 10.10.1.0/16
|
cidr: 10.10.1.0/16
|
||||||
vpc_offering: Redundant VPC offering
|
vpc_offering: Redundant VPC offering
|
||||||
|
network_domain: test.example.com
|
||||||
zone: "{{ cs_common_zone_adv }}"
|
zone: "{{ cs_common_zone_adv }}"
|
||||||
register: vpc
|
register: vpc
|
||||||
- name: verify test create vpc with custom offering
|
- name: verify test create vpc with custom offering
|
||||||
|
@ -78,6 +80,7 @@
|
||||||
- vpc.name == "{{ cs_resource_prefix }}_vpc_custom"
|
- vpc.name == "{{ cs_resource_prefix }}_vpc_custom"
|
||||||
- vpc.display_text == "{{ cs_resource_prefix }}_display_text_custom"
|
- vpc.display_text == "{{ cs_resource_prefix }}_display_text_custom"
|
||||||
- vpc.cidr == "10.10.1.0/16"
|
- vpc.cidr == "10.10.1.0/16"
|
||||||
|
- vpc.network_domain == "test.example.com"
|
||||||
|
|
||||||
- name: test create vpc with custom offering idempotence
|
- name: test create vpc with custom offering idempotence
|
||||||
cs_vpc:
|
cs_vpc:
|
||||||
|
@ -85,6 +88,7 @@
|
||||||
display_text: "{{ cs_resource_prefix }}_display_text_custom"
|
display_text: "{{ cs_resource_prefix }}_display_text_custom"
|
||||||
cidr: 10.10.1.0/16
|
cidr: 10.10.1.0/16
|
||||||
vpc_offering: Redundant VPC offering
|
vpc_offering: Redundant VPC offering
|
||||||
|
network_domain: test.example.com
|
||||||
zone: "{{ cs_common_zone_adv }}"
|
zone: "{{ cs_common_zone_adv }}"
|
||||||
register: vpc
|
register: vpc
|
||||||
- name: verify test create vpc with custom offering idempotence
|
- name: verify test create vpc with custom offering idempotence
|
||||||
|
@ -95,6 +99,8 @@
|
||||||
- vpc.name == "{{ cs_resource_prefix }}_vpc_custom"
|
- vpc.name == "{{ cs_resource_prefix }}_vpc_custom"
|
||||||
- vpc.display_text == "{{ cs_resource_prefix }}_display_text_custom"
|
- vpc.display_text == "{{ cs_resource_prefix }}_display_text_custom"
|
||||||
- vpc.cidr == "10.10.1.0/16"
|
- vpc.cidr == "10.10.1.0/16"
|
||||||
|
- vpc.network_domain == "test.example.com"
|
||||||
|
|
||||||
|
|
||||||
- name: test create vpc with default offering in check mode
|
- name: test create vpc with default offering in check mode
|
||||||
cs_vpc:
|
cs_vpc:
|
||||||
|
|
Loading…
Reference in a new issue