|
|
|
@ -179,6 +179,8 @@
|
|
|
|
|
resource_group: "{{ resource_group }}"
|
|
|
|
|
server_name: postgresqlsrv{{ rpfx }}
|
|
|
|
|
name: testdatabase
|
|
|
|
|
charset: UTF8
|
|
|
|
|
collation: English_United States.1252
|
|
|
|
|
check_mode: yes
|
|
|
|
|
register: output
|
|
|
|
|
- name: Assert the resource instance is well created
|
|
|
|
@ -191,6 +193,8 @@
|
|
|
|
|
resource_group: "{{ resource_group }}"
|
|
|
|
|
server_name: postgresqlsrv{{ rpfx }}
|
|
|
|
|
name: testdatabase
|
|
|
|
|
charset: UTF8
|
|
|
|
|
collation: English_United States.1252
|
|
|
|
|
register: output
|
|
|
|
|
- name: Assert the resource instance is well created
|
|
|
|
|
assert:
|
|
|
|
@ -203,6 +207,8 @@
|
|
|
|
|
resource_group: "{{ resource_group }}"
|
|
|
|
|
server_name: postgresqlsrv{{ rpfx }}
|
|
|
|
|
name: testdatabase
|
|
|
|
|
charset: UTF8
|
|
|
|
|
collation: English_United States.1252
|
|
|
|
|
register: output
|
|
|
|
|
- name: Assert the state has not changed
|
|
|
|
|
assert:
|
|
|
|
@ -210,6 +216,35 @@
|
|
|
|
|
- output.changed == false
|
|
|
|
|
- output.name == 'testdatabase'
|
|
|
|
|
|
|
|
|
|
- name: Try to update PostgreSQL Database without force_update
|
|
|
|
|
azure_rm_postgresqldatabase:
|
|
|
|
|
resource_group: "{{ resource_group }}"
|
|
|
|
|
server_name: postgresqlsrv{{ rpfx }}
|
|
|
|
|
name: testdatabase
|
|
|
|
|
charset: WIN1252
|
|
|
|
|
collation: SQL_Latin1_General_CP1_CS_AS
|
|
|
|
|
ignore_errors: yes
|
|
|
|
|
register: output
|
|
|
|
|
- name: Assert that nothing has changed
|
|
|
|
|
assert:
|
|
|
|
|
that:
|
|
|
|
|
- output.changed == False
|
|
|
|
|
|
|
|
|
|
- name: Try to update PostgreSQL Database with force_update
|
|
|
|
|
azure_rm_postgresqldatabase:
|
|
|
|
|
resource_group: "{{ resource_group }}"
|
|
|
|
|
server_name: postgresqlsrv{{ rpfx }}
|
|
|
|
|
name: testdatabase
|
|
|
|
|
charset: WIN1252
|
|
|
|
|
collation: SQL_Latin1_General_CP1_CS_AS
|
|
|
|
|
force_update: yes
|
|
|
|
|
register: output
|
|
|
|
|
- name: Assert the state has changed
|
|
|
|
|
assert:
|
|
|
|
|
that:
|
|
|
|
|
- output.changed
|
|
|
|
|
- output.name == 'testdatabase'
|
|
|
|
|
|
|
|
|
|
- name: Create second instance of PostgreSQL Database
|
|
|
|
|
azure_rm_postgresqldatabase:
|
|
|
|
|
resource_group: "{{ resource_group }}"
|
|
|
|
|