10b02e17b9
* - initial commit for the modules and tests * initial implementation based on ec2_asg * docstring implemtation and further methods initial implementation * refactoring and pylint changes * further implementation and integration tests * added examples and parameter documentation * removed files that were essentially templates * added waiter for delete and updated the tests * removed unit test * fixed pep8 failure * fixed pep8 failure * fixed pep8 password field issue * fixed pep8 password field issue * fixed syntax issues * fixed pep8 defaults * password property documentation was breaking yaml * fixed pep8 defaults * fixed lack of defaults for wait parameter * added default to boolean parameter * pep8 fix * fixed author entry * adding type to wait parameter * adding type to wait parameter * fixed linting issues * updated description and removed default from docs * added metaclass changed default for boolean * changed declared defaults * - fixe the delete function - solved the yaml syntax issue * added missing defaults for timeout, retry and removed the one for endpointtype as it should be None, becasue parameter is Required anyway * fixed RETURN documentation issue * trying to fix the import placement error * trying to fix the doc error for missing params * pep8 issues * added endpoint aliases * - added documentation * pep8 * changed to unsupported tag * changed no_log fact to yes in the integration tests * added suggested changes to the integration tests * - making severname use resource_prefix as well as a more generic domain - removing test fact
136 lines
No EOL
3.5 KiB
YAML
136 lines
No EOL
3.5 KiB
YAML
---
|
|
|
|
- name: set connection information for all tasks
|
|
set_fact:
|
|
aws_connection_info: &aws_connection_info
|
|
aws_access_key: "{{ aws_access_key }}"
|
|
aws_secret_key: "{{ aws_secret_key }}"
|
|
region: "{{ aws_region }}"
|
|
dms_identifier: "{{ resource_prefix }}-dms"
|
|
no_log: yes
|
|
|
|
- block:
|
|
- name: create endpoints
|
|
dms_endpoint:
|
|
state: present
|
|
endpointidentifier: "{{ dms_identifier }}"
|
|
endpointtype: source
|
|
enginename: aurora
|
|
username: testing
|
|
password: testint1234
|
|
servername: "{{ resource_prefix }}.exampledomain.com"
|
|
port: 3306
|
|
databasename: 'testdb'
|
|
sslmode: none
|
|
<<: *aws_connection_info
|
|
register: result
|
|
|
|
- assert:
|
|
that:
|
|
- result is changed
|
|
- result is not failed
|
|
|
|
- name: create endpoints no change
|
|
dms_endpoint:
|
|
state: present
|
|
endpointidentifier: "{{ dms_identifier }}"
|
|
endpointtype: source
|
|
enginename: aurora
|
|
username: testing
|
|
password: testint1234
|
|
servername: "{{ resource_prefix }}.exampledomain.com"
|
|
port: 3306
|
|
databasename: 'testdb'
|
|
sslmode: none
|
|
<<: *aws_connection_info
|
|
register: result
|
|
|
|
- assert:
|
|
that:
|
|
- result is not changed
|
|
- result is not failed
|
|
|
|
- name: update endpoints
|
|
dms_endpoint:
|
|
state: present
|
|
endpointidentifier: "{{ dms_identifier }}"
|
|
endpointtype: source
|
|
enginename: aurora
|
|
username: testing
|
|
password: testint1234
|
|
servername: "{{ resource_prefix }}.exampledomain.com"
|
|
port: 3306
|
|
databasename: 'testdb2'
|
|
sslmode: none
|
|
<<: *aws_connection_info
|
|
register: result
|
|
|
|
- assert:
|
|
that:
|
|
- result is changed
|
|
- result is not failed
|
|
|
|
- name: update endpoints no change
|
|
dms_endpoint:
|
|
state: present
|
|
endpointidentifier: "{{ dms_identifier }}"
|
|
endpointtype: source
|
|
enginename: aurora
|
|
username: testing
|
|
password: testint1234
|
|
servername: "{{ resource_prefix }}.exampledomain.com"
|
|
port: 3306
|
|
databasename: 'testdb2'
|
|
sslmode: none
|
|
<<: *aws_connection_info
|
|
register: result
|
|
|
|
- assert:
|
|
that:
|
|
- result is not changed
|
|
- result is not failed
|
|
|
|
always:
|
|
- name: delete endpoints
|
|
dms_endpoint:
|
|
state: absent
|
|
endpointidentifier: "{{ dms_identifier }}"
|
|
endpointtype: source
|
|
enginename: aurora
|
|
username: testing
|
|
password: testint1234
|
|
servername: "{{ resource_prefix }}.exampledomain.com"
|
|
port: 3306
|
|
databasename: 'testdb'
|
|
sslmode: none
|
|
wait: True
|
|
timeout: 60
|
|
retries: 10
|
|
<<: *aws_connection_info
|
|
register: result
|
|
|
|
- assert:
|
|
that:
|
|
- result is changed
|
|
- result is not failed
|
|
|
|
- name: delete endpoints no change
|
|
dms_endpoint:
|
|
state: absent
|
|
endpointidentifier: "{{ dms_identifier }}"
|
|
endpointtype: source
|
|
enginename: aurora
|
|
username: testing
|
|
password: testint1234
|
|
servername: "{{ resource_prefix }}.exampledomain.com"
|
|
port: 3306
|
|
databasename: 'testdb'
|
|
sslmode: none
|
|
wait: False
|
|
<<: *aws_connection_info
|
|
register: result
|
|
|
|
- assert:
|
|
that:
|
|
- result is not changed
|
|
- result is not failed |