|
|
|
@ -196,6 +196,8 @@
|
|
|
|
|
resource_group: "{{ resource_group }}"
|
|
|
|
|
server_name: mysqlsrv{{ rpfx }}
|
|
|
|
|
name: testdatabase
|
|
|
|
|
collation: latin1_swedish_ci
|
|
|
|
|
charset: latin1
|
|
|
|
|
register: output
|
|
|
|
|
- name: Assert the resource instance is well created
|
|
|
|
|
assert:
|
|
|
|
@ -208,6 +210,8 @@
|
|
|
|
|
resource_group: "{{ resource_group }}"
|
|
|
|
|
server_name: mysqlsrv{{ rpfx }}
|
|
|
|
|
name: testdatabase
|
|
|
|
|
collation: latin1_swedish_ci
|
|
|
|
|
charset: latin1
|
|
|
|
|
register: output
|
|
|
|
|
- name: Assert the state has not changed
|
|
|
|
|
assert:
|
|
|
|
@ -215,6 +219,35 @@
|
|
|
|
|
- output.changed == false
|
|
|
|
|
- output.name == 'testdatabase'
|
|
|
|
|
|
|
|
|
|
- name: Try to update database without force_update
|
|
|
|
|
azure_rm_mysqldatabase:
|
|
|
|
|
resource_group: "{{ resource_group }}"
|
|
|
|
|
server_name: mysqlsrv{{ rpfx }}
|
|
|
|
|
name: testdatabase
|
|
|
|
|
collation: latin1_czech_ci
|
|
|
|
|
charset: latin1
|
|
|
|
|
ignore_errors: yes
|
|
|
|
|
register: output
|
|
|
|
|
- name: Assert that nothing has changed
|
|
|
|
|
assert:
|
|
|
|
|
that:
|
|
|
|
|
- output.changed == False
|
|
|
|
|
|
|
|
|
|
- name: Update instance of database using force_update
|
|
|
|
|
azure_rm_mysqldatabase:
|
|
|
|
|
resource_group: "{{ resource_group }}"
|
|
|
|
|
server_name: mysqlsrv{{ rpfx }}
|
|
|
|
|
name: testdatabase
|
|
|
|
|
collation: latin1_czech_ci
|
|
|
|
|
charset: latin1
|
|
|
|
|
force_update: yes
|
|
|
|
|
register: output
|
|
|
|
|
- name: Assert the state has changed
|
|
|
|
|
assert:
|
|
|
|
|
that:
|
|
|
|
|
- output.changed
|
|
|
|
|
- output.name == 'testdatabase'
|
|
|
|
|
|
|
|
|
|
- name: Create second instance of MySQL Database
|
|
|
|
|
azure_rm_mysqldatabase:
|
|
|
|
|
resource_group: "{{ resource_group }}"
|
|
|
|
|