generated from ansible-collections/collection_template
-
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
tests/integration/targets/win_contained_availability_group/meta/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
--- | ||
dependencies: | ||
- setup_sqlserver_test_plugins |
64 changes: 64 additions & 0 deletions
64
tests/integration/targets/win_contained_availability_group/tasks/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
--- | ||
- name: Var block | ||
vars: | ||
ag_name: "containedAG" | ||
cluster_type: "None" | ||
contained_availability_group: true | ||
force: false | ||
module_defaults: | ||
lowlydba.sqlserver.availability_group: | ||
sql_instance: "{{ sqlserver_instance }}" | ||
sql_username: "{{ sqlserver_username }}" | ||
sql_password: "{{ sqlserver_password }}" | ||
ag_name: "{{ ag_name }}" | ||
cluster_type: "{{ cluster_type }}" | ||
failover_mode: "{{ failover_mode }}" | ||
dtc_support_enabled: "{{ dtc_support_enabled }}" | ||
availability_mode: "{{ availability_mode }}" | ||
seeding_mode: "{{ seeding_mode }}" | ||
database_health_trigger: "{{ database_health_trigger }}" | ||
database: "{{ database }}" | ||
healthcheck_timeout: "{{ healthcheck_timeout }}" | ||
basic_availability_group: "{{ basic_availability_group }}" | ||
contained_availability_group: "{{ contained_availability_group }}" | ||
force: "{{ force }}" | ||
allow_null_backup: true | ||
failure_condition_level: "{{ failure_condition_level }}" | ||
tags: ["availability_group"] | ||
block: | ||
- name: Enable hadr | ||
lowlydba.sqlserver.hadr: | ||
sql_instance: "{{ sqlserver_instance }}" | ||
sql_username: "{{ sqlserver_username }}" | ||
sql_password: "{{ sqlserver_password }}" | ||
enabled: true | ||
force: true | ||
|
||
- name: Create availability group | ||
lowlydba.sqlserver.availability_group: | ||
register: result | ||
- assert: | ||
that: | ||
- result.data.ComputerName != None | ||
- result.data.InstanceName != None | ||
- result.data.SqlInstance != None | ||
- result.data.AvailabilityGroup == "{{ ag_name }}" | ||
- result.data.ClusterType == "{{ cluster_type }}" | ||
- result.data.AvailabilityReplicas != None | ||
- result is changed | ||
- result.data.containedAvailabilityGroup is true | ||
|
||
- name: Create listener | ||
lowlydba.sqlserver.ag_listener: | ||
ag_name: "{{ ag_name }}" | ||
sql_instance: "{{ sqlserver_instance }}" | ||
listener_name: "{{ ag_name }}-lis" | ||
|
||
- name: Create login on contained AG | ||
lowlydba.sqlserver.login: | ||
sql_instance: "{{ ag_name }}-lis" | ||
login: TheIntern | ||
password: ReallyComplexStuff12345! | ||
- assert: | ||
that: | ||
- result.data != None |