merge conflict
This commit is contained in:
parent
f85cd0b0c2
commit
0fed03fa85
4 changed files with 41 additions and 5 deletions
|
@ -0,0 +1,2 @@
|
|||
bugfixes:
|
||||
- azure_rm_postgresqlserver - fixed issues with passing parameters while updating existing server instance
|
|
@ -227,7 +227,7 @@ class AzureRMServers(AzureRMModuleBase):
|
|||
elif key == "location":
|
||||
self.parameters["location"] = kwargs[key]
|
||||
elif key == "storage_mb":
|
||||
self.parameters.setdefault("properties", {})["storage_mb"] = kwargs[key]
|
||||
self.parameters.setdefault("properties", {}).setdefault("storage_profile", {})["storage_mb"] = kwargs[key]
|
||||
elif key == "version":
|
||||
self.parameters.setdefault("properties", {})["version"] = kwargs[key]
|
||||
elif key == "enforce_ssl":
|
||||
|
@ -319,9 +319,11 @@ class AzureRMServers(AzureRMModuleBase):
|
|||
server_name=self.name,
|
||||
parameters=self.parameters)
|
||||
else:
|
||||
response = self.mgmt_client.servers.update(resource_group_name=self.resource_group,
|
||||
server_name=self.name,
|
||||
parameters=self.parameters)
|
||||
# structure of parameters for update must be changed
|
||||
self.parameters.update(self.parameters.pop("properties", {}))
|
||||
response = self.postgresql_client.servers.update(resource_group_name=self.resource_group,
|
||||
server_name=self.name,
|
||||
parameters=self.parameters)
|
||||
if isinstance(response, LROPoller):
|
||||
response = self.get_poller_result(response)
|
||||
|
||||
|
|
|
@ -4,4 +4,5 @@ shippable/azure/group8
|
|||
azure_rm_postgresqlserver_facts
|
||||
azure_rm_postgresqldatabase
|
||||
azure_rm_postgresqldatabase_facts
|
||||
disabled
|
||||
azure_rm_postgresqlfirewallrule
|
||||
azure_rm_postgresqlfirewallrule_facts
|
||||
|
|
|
@ -60,6 +60,37 @@
|
|||
- output.changed == false
|
||||
- output.state == 'Ready'
|
||||
|
||||
- name: Update instance of PostgreSQL Server, change storage size
|
||||
azure_rm_postgresqlserver:
|
||||
resource_group: "{{ resource_group }}"
|
||||
name: postgresqlsrv{{ rpfx }}
|
||||
sku:
|
||||
name: B_Gen5_1
|
||||
tier: Basic
|
||||
location: westus2
|
||||
storage_mb: 128000
|
||||
enforce_ssl: True
|
||||
admin_username: zimxyz
|
||||
admin_password: Testpasswordxyz12!
|
||||
register: output
|
||||
- name: Assert the state has not changed
|
||||
assert:
|
||||
that:
|
||||
- output.changed
|
||||
- output.state == 'Ready'
|
||||
- debug:
|
||||
var: output
|
||||
|
||||
- name: Gather facts postgresql Server
|
||||
azure_rm_postgresqlserver_facts:
|
||||
resource_group: "{{ resource_group }}"
|
||||
name: postgresqlsrv{{ rpfx }}
|
||||
register: output
|
||||
- name: Assert that storage size is correct
|
||||
assert:
|
||||
that:
|
||||
- output.servers[0]['storage_mb'] == 128000
|
||||
|
||||
- name: Create second instance of PostgreSQL Server
|
||||
azure_rm_postgresqlserver:
|
||||
resource_group: "{{ resource_group }}"
|
||||
|
|
Loading…
Reference in a new issue