Skip to content

Commit f605148

Browse files
committed
Fix spelling
1 parent dc28a1d commit f605148

14 files changed

+70
-41
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ Changelog
633633
- Add workarounds for known issues in SQL Server 2022
634634
- Use delay=3 timeout=40 in wait_for module to avoid unreachable server
635635

636-
- Imrpove performance by intputting multiple SQL files with loop internaly (#116)
636+
- Improve performance by intputting multiple SQL files with loop internally (#116)
637637
- Make it possible to input multiple file with loop internally
638638
- Rename task file and vars for clarity
639639
- Make regex for files extension search more strict

README.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ The role uses `sqlcmd` for the following tasks:
9898
By default, installs and uses the latest version 18.
9999

100100
You can set this variable to `[17, 18]` to install two versions in parallel.
101-
In the case when this variable contains multiple elements, the role instals both but uses latest provided version.
101+
In the case when this variable contains multiple elements, the role installs both but uses latest provided version.
102102

103103
The role does not remove mssql-tools packages if you unset a version with this variable.
104104

@@ -311,6 +311,7 @@ Type: `bool`
311311

312312
#### Inputting SQL script files and content to SQL Server
313313

314+
<!-- codespell:ignore-begin -->
314315
```yaml
315316
- hosts: all
316317
vars:
@@ -358,6 +359,7 @@ Type: `bool`
358359
END
359360
GO
360361
```
362+
<!-- codespell:ignore-end -->
361363

362364
## Installing Additional Packages
363365

@@ -793,9 +795,9 @@ Default: `null`
793795

794796
Type: `string`
795797

796-
#### mssql_ha_master_key_password
798+
#### mssql_ha_master_key_password <!-- codespell:ignore master -->
797799

798-
The password to set for the master key used with the certificate.
800+
The password to set for the master key used with the certificate.<!-- codespell:ignore master -->
799801

800802
Default: `null`
801803

@@ -999,6 +1001,7 @@ all:
9991001
```
10001002

10011003
Playbook:
1004+
<!-- codespell:ignore-begin -->
10021005

10031006
```yaml
10041007
- hosts: all
@@ -1025,6 +1028,7 @@ Playbook:
10251028
roles:
10261029
- microsoft.sql.server
10271030
```
1031+
<!-- codespell:ignore-end -->
10281032

10291033
#### Configuring SQL Server with HA and Pacemaker on Bare Metal
10301034

@@ -1034,6 +1038,7 @@ This example configures required Pacemaker properties and resources and enables
10341038

10351039
The `fedora.linux_system_roles.ha_cluster` role expects watchdog devices to be configured on `/dev/watchdog` by default, you can set a different device per host in inventory.
10361040
For more information, see the `fedora.linux_system_roles.ha_cluster` role documentation.
1041+
<!-- codespell:ignore-begin -->
10371042

10381043
```yaml
10391044
- hosts: all
@@ -1123,12 +1128,14 @@ For more information, see the `fedora.linux_system_roles.ha_cluster` role docume
11231128
- microsoft.sql.server
11241129
```
11251130

1131+
<!-- codespell:ignore-end -->
11261132
#### Configuring SQL Server with HA and Pacemaker on VMWare
11271133

11281134
If you want to configure Pacemaker from this role, you can set [mssql_manage_ha_cluster](#mssql_manage_ha_cluster) to `true` and provide variables required by the `fedora.linux_system_roles.ha_cluster` role to configure Pacemaker for your environment properly.
11291135
See the `fedora.linux_system_roles.ha_cluster` role documentation for more information.
11301136

11311137
Note that production environments require Pacemaker configured with fencing agents, this example playbook configures the `stonith:fence_vmware_soap` agent.
1138+
<!-- codespell:ignore-begin -->
11321139

11331140
```yaml
11341141
- hosts: all
@@ -1226,6 +1233,7 @@ Note that production environments require Pacemaker configured with fencing agen
12261233
roles:
12271234
- microsoft.sql.server
12281235
```
1236+
<!-- codespell:ignore-end -->
12291237

12301238
#### Configuring SQL Server with HA and Pacemaker on Azure
12311239

@@ -1243,6 +1251,7 @@ See the `fedora.linux_system_roles.ha_cluster` role documentation for more infor
12431251
Note that production environments require Pacemaker configured with fencing agents, this example playbook configures the `stonith:fence_azure_arm` agent.
12441252

12451253
This example playbooks sets the `firewall` variables for the `fedora.linux_system_roles.firewall` role and then runs this role to open the probe port configured in Azure.
1254+
<!-- codespell:ignore-begin -->
12461255

12471256
```yaml
12481257
- hosts: all
@@ -1371,6 +1380,7 @@ This example playbooks sets the `firewall` variables for the `fedora.linux_syste
13711380
- fedora.linux_system_roles.firewall
13721381
- microsoft.sql.server
13731382
```
1383+
<!-- codespell:ignore-end -->
13741384

13751385
## Configuring SQL Server to authenticate with Active Directory (AD) Server
13761386

@@ -1569,6 +1579,7 @@ Type: `string`
15691579
### AD Example Playbooks
15701580

15711581
#### Configuring AD integration with general parameters
1582+
<!-- codespell:ignore-begin -->
15721583

15731584
```yaml
15741585
- name: Configure with AD server authentication
@@ -1607,10 +1618,12 @@ Type: `string`
16071618
PRINT 'A <mydomain>\<myADlogin> login already exists, skipping'
16081619
END
16091620
```
1621+
<!-- codespell:ignore-end -->
16101622

16111623
#### Configuring AD integration with a pre-created keytab file
16121624

16131625
If you received a pre-created keytab file and want the role to use it, set variables like in this example:
1626+
<!-- codespell:ignore-begin -->
16141627

16151628
```yaml
16161629
- name: Configure with AD server authentication with a pre-created keytab file
@@ -1649,10 +1662,12 @@ If you received a pre-created keytab file and want the role to use it, set varia
16491662
PRINT 'A <mydomain>\<myADlogin> login already exists, skipping'
16501663
END
16511664
```
1665+
<!-- codespell:ignore-end -->
16521666

16531667
#### Configuring AD integration without joining to AD
16541668

16551669
You must join managed host to AD Server yourself prior to running this playbook.
1670+
<!-- codespell:ignore-begin -->
16561671

16571672
```yaml
16581673
- name: Configure with AD server authentication without joining to AD
@@ -1687,6 +1702,7 @@ You must join managed host to AD Server yourself prior to running this playbook.
16871702
PRINT 'A <mydomain>\<myADlogin> login already exists, skipping'
16881703
END
16891704
```
1705+
<!-- codespell:ignore-end -->
16901706

16911707
## License
16921708

defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ mssql_ha_replica_type: null
4747
mssql_ha_endpoint_port: 5022
4848
mssql_ha_cert_name: null
4949
mssql_ha_private_key_password: null
50-
mssql_ha_master_key_password: null
50+
mssql_ha_master_key_password: null # codespell:ignore master
5151
mssql_ha_reset_cert: false
5252
mssql_ha_endpoint_name: null
5353
mssql_ha_ag_name: null

tasks/main.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1210,7 +1210,7 @@
12101210
- name: Configure SQL entities on the primary replica
12111211
vars:
12121212
__mssql_sql_files_to_input:
1213-
- create_master_key_encryption.j2
1213+
- create_master_key_encryption.j2 # codespell:ignore master
12141214
- create_and_back_up_cert.j2
12151215
- enable_alwayson.j2
12161216
- configure_endpoint.j2
@@ -1382,7 +1382,7 @@
13821382
vars:
13831383
__mssql_sql_files_to_input:
13841384
- enable_alwayson.j2
1385-
- create_master_key_encryption.j2
1385+
- create_master_key_encryption.j2 # codespell:ignore master
13861386
- restore_cert.j2
13871387
- configure_endpoint.j2
13881388
include_tasks: input_sql_files.yml

templates/create_and_back_up_cert.j2

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
SET NOCOUNT ON;
44

55
DECLARE @cerExists INT;
6-
EXEC master.dbo.xp_fileexist '{{ __mssql_ha_cert_dest }}', @cerExists OUTPUT;
6+
EXEC master.dbo.xp_fileexist '{{ __mssql_ha_cert_dest }}', @cerExists OUTPUT; {# codespell:ignore master #}
77
DECLARE @pvkExists INT;
8-
EXEC master.dbo.xp_fileexist '{{ __mssql_ha_private_key_dest }}',
8+
EXEC master.dbo.xp_fileexist '{{ __mssql_ha_private_key_dest }}', {# codespell:ignore master #}
99
@pvkExists OUTPUT;
1010

1111
IF NOT EXISTS(

templates/create_ha_login.j2

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
USE master;
1+
USE master; {# codespell:ignore master #}
22
IF NOT EXISTS (
33
SELECT name FROM sys.server_principals
44
WHERE name = '{{ mssql_ha_login }}'

templates/create_master_key_encryption.j2

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,31 +6,31 @@ IF NOT EXISTS (
66
BEGIN
77
PRINT 'Master key does not exist, creating';
88
CREATE MASTER KEY ENCRYPTION BY PASSWORD =
9-
'{{ mssql_ha_master_key_password }}';
9+
'{{ mssql_ha_master_key_password }}'; {# codespell:ignore master #}
1010
PRINT 'Master key created successfully';
1111
END
1212
ELSE
1313
BEGIN
1414
PRINT 'Master key already exists, verifying the provided password against \
15-
the existing master key';
15+
the existing master key'; {# codespell:ignore master #}
1616
BEGIN TRY
1717
OPEN MASTER KEY DECRYPTION BY PASSWORD =
18-
'{{ mssql_ha_master_key_password }}';
19-
PRINT 'The provided master key password is correct';
18+
'{{ mssql_ha_master_key_password }}'; {# codespell:ignore master #}
19+
PRINT 'The provided master key password is correct'; {# codespell:ignore master #}
2020
END TRY
2121
BEGIN CATCH
2222
{% if not mssql_ha_reset_cert %}
23-
PRINT 'You provided an incorrect master key password with the \
24-
mssql_ha_master_key_password variable';
23+
PRINT 'You provided an incorrect master key password with the \ {# codespell:ignore master #}
24+
mssql_ha_master_key_password variable'; {# codespell:ignore master #}
2525
THROW;
2626
{% elif mssql_ha_reset_cert %}
2727
PRINT 'Master key password provided with the \
28-
mssql_ha_master_key_password variable does not match the existing password, \
29-
dropping master key to re-create it';
28+
mssql_ha_master_key_password variable does not match the existing password, \ {# codespell:ignore master #}
29+
dropping master key to re-create it'; {# codespell:ignore master #}
3030
DROP MASTER KEY;
3131
PRINT 'Master key dropped successfully';
3232
CREATE MASTER KEY ENCRYPTION BY PASSWORD =
33-
'{{ mssql_ha_master_key_password }}';
33+
'{{ mssql_ha_master_key_password }}'; {# codespell:ignore master #}
3434
PRINT 'Master key created successfully';
3535
{% endif %}
3636
END CATCH

templates/replicate_db.j2

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,16 @@ IF NOT EXISTS (
4444
ISNULL(dbrs.synchronization_state, 0) AS [SynchronizationState],
4545
ISNULL(dbrs.is_suspended, 0) AS [IsSuspended],
4646
ISNULL(dbcs.is_database_joined, 0) AS [IsJoined]
47-
FROM master.sys.availability_groups AS AG
48-
LEFT OUTER JOIN master.sys.dm_hadr_availability_group_states as agstates
47+
FROM master.sys.availability_groups AS AG {# codespell:ignore master #}
48+
LEFT OUTER JOIN master.sys.dm_hadr_availability_group_states as agstates {# codespell:ignore master #}
4949
ON AG.group_id = agstates.group_id
50-
INNER JOIN master.sys.availability_replicas AS AR
50+
INNER JOIN master.sys.availability_replicas AS AR {# codespell:ignore master #}
5151
ON AG.group_id = AR.group_id
52-
INNER JOIN master.sys.dm_hadr_availability_replica_states AS arstates
52+
INNER JOIN master.sys.dm_hadr_availability_replica_states AS arstates {# codespell:ignore master #}
5353
ON AR.replica_id = arstates.replica_id AND arstates.is_local = 1
54-
INNER JOIN master.sys.dm_hadr_database_replica_cluster_states AS dbcs
54+
INNER JOIN master.sys.dm_hadr_database_replica_cluster_states AS dbcs {# codespell:ignore master #}
5555
ON arstates.replica_id = dbcs.replica_id
56-
LEFT OUTER JOIN master.sys.dm_hadr_database_replica_states AS dbrs
56+
LEFT OUTER JOIN master.sys.dm_hadr_database_replica_states AS dbrs {# codespell:ignore master #}
5757
ON dbcs.replica_id = dbrs.replica_id
5858
AND dbcs.group_database_id = dbrs.group_database_id
5959
WHERE dbcs.database_name = '{{ item }}'

tests/files/sql_script.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
IF NOT EXISTS (
22
SELECT name
3-
FROM master.sys.server_principals
3+
FROM master.sys.server_principals {# codespell:ignore master #}
44
WHERE name = 'MyLogin'
55
)
66
BEGIN
@@ -64,4 +64,4 @@ ELSE
6464
BEGIN
6565
PRINT 'The Inventory table already exists, skipping';
6666
END
67-
GO
67+
GO

tests/playbooks/tests_ad_integration.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
# mssql_ad_join: false does ad_integration_user: null
4646
__mssql_ad_login: >-
4747
{{ ad_integration_realm.split('.') | first + '\Administrator' }}
48+
# codespell:ignore-begin
4849
mssql_post_input_sql_content: |-
4950
USE master;
5051
IF NOT EXISTS (
@@ -60,6 +61,7 @@
6061
BEGIN
6162
PRINT 'A {{ __mssql_ad_login }} login already exists, skipping'
6263
END
64+
# codespell:ignore-end
6365

6466
tasks:
6567
# Test general scenario

0 commit comments

Comments
 (0)