generated from linux-system-roles/template
-
Notifications
You must be signed in to change notification settings - Fork 23
/
.README.html
2172 lines (2161 loc) · 203 KB
/
.README.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<!--
==============================================================================
"GitHub HTML5 Pandoc Template" v2.2 — by Tristano Ajmone
==============================================================================
Copyright © Tristano Ajmone, 2017-2020, MIT License (MIT). Project's home:
- https://github.com/tajmone/pandoc-goodies
The CSS in this template reuses source code taken from the following projects:
- GitHub Markdown CSS: Copyright © Sindre Sorhus, MIT License (MIT):
https://github.com/sindresorhus/github-markdown-css
- Primer CSS: Copyright © 2016-2017 GitHub Inc., MIT License (MIT):
http://primercss.io/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The MIT License
Copyright (c) Tristano Ajmone, 2017-2020 (github.com/tajmone/pandoc-goodies)
Copyright (c) Sindre Sorhus <[email protected]> (sindresorhus.com)
Copyright (c) 2017 GitHub Inc.
"GitHub Pandoc HTML5 Template" is Copyright (c) Tristano Ajmone, 2017-2020,
released under the MIT License (MIT); it contains readaptations of substantial
portions of the following third party softwares:
(1) "GitHub Markdown CSS", Copyright (c) Sindre Sorhus, MIT License (MIT).
(2) "Primer CSS", Copyright (c) 2016 GitHub Inc., MIT License (MIT).
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
==============================================================================-->
<html>
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>Microsoft SQL Server</title>
<style type="text/css">
@charset "UTF-8";.markdown-body{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;color:#24292e;font-family:-apple-system,system-ui,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol";font-size:16px;line-height:1.5;word-wrap:break-word;box-sizing:border-box;min-width:200px;margin:0 auto;padding:45px}.markdown-body a{color:#0366d6;background-color:transparent;text-decoration:none;-webkit-text-decoration-skip:objects}.markdown-body a:active,.markdown-body a:hover{outline-width:0}.markdown-body a:hover{text-decoration:underline}.markdown-body a:not([href]){color:inherit;text-decoration:none}.markdown-body strong{font-weight:600}.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6{margin-top:24px;margin-bottom:16px;font-weight:600;line-height:1.25}.markdown-body h1{font-size:2em;margin:.67em 0;padding-bottom:.3em;border-bottom:1px solid #eaecef}.markdown-body h2{padding-bottom:.3em;font-size:1.5em;border-bottom:1px solid #eaecef}.markdown-body h3{font-size:1.25em}.markdown-body h4{font-size:1em}.markdown-body h5{font-size:.875em}.markdown-body h6{font-size:.85em;color:#6a737d}.markdown-body img{border-style:none}.markdown-body svg:not(:root){overflow:hidden}.markdown-body hr{box-sizing:content-box;height:.25em;margin:24px 0;padding:0;overflow:hidden;background-color:#e1e4e8;border:0}.markdown-body hr::before{display:table;content:""}.markdown-body hr::after{display:table;clear:both;content:""}.markdown-body input{margin:0;overflow:visible;font:inherit;font-family:inherit;font-size:inherit;line-height:inherit}.markdown-body [type=checkbox]{box-sizing:border-box;padding:0}.markdown-body *{box-sizing:border-box}.markdown-body blockquote{margin:0}.markdown-body ol,.markdown-body ul{padding-left:2em}.markdown-body ol ol,.markdown-body ul ol{list-style-type:lower-roman}.markdown-body ol ol,.markdown-body ol ul,.markdown-body ul ol,.markdown-body ul ul{margin-top:0;margin-bottom:0}.markdown-body ol ol ol,.markdown-body ol ul ol,.markdown-body ul ol ol,.markdown-body ul ul ol{list-style-type:lower-alpha}.markdown-body li>p{margin-top:16px}.markdown-body li+li{margin-top:.25em}.markdown-body dd{margin-left:0}.markdown-body dl{padding:0}.markdown-body dl dt{padding:0;margin-top:16px;font-size:1em;font-style:italic;font-weight:600}.markdown-body dl dd{padding:0 16px;margin-bottom:16px}.markdown-body code{font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace}.markdown-body pre{font:12px SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;word-wrap:normal}.markdown-body blockquote,.markdown-body dl,.markdown-body ol,.markdown-body p,.markdown-body pre,.markdown-body table,.markdown-body ul{margin-top:0;margin-bottom:16px}.markdown-body blockquote{padding:0 1em;color:#6a737d;border-left:.25em solid #dfe2e5}.markdown-body blockquote>:first-child{margin-top:0}.markdown-body blockquote>:last-child{margin-bottom:0}.markdown-body table{display:block;width:100%;overflow:auto;border-spacing:0;border-collapse:collapse}.markdown-body table th{font-weight:600}.markdown-body table td,.markdown-body table th{padding:6px 13px;border:1px solid #dfe2e5}.markdown-body table tr{background-color:#fff;border-top:1px solid #c6cbd1}.markdown-body table tr:nth-child(2n){background-color:#f6f8fa}.markdown-body img{max-width:100%;box-sizing:content-box;background-color:#fff}.markdown-body code{padding:.2em 0;margin:0;font-size:85%;background-color:rgba(27,31,35,.05);border-radius:3px}.markdown-body code::after,.markdown-body code::before{letter-spacing:-.2em;content:" "}.markdown-body pre>code{padding:0;margin:0;font-size:100%;word-break:normal;white-space:pre;background:0 0;border:0}.markdown-body .highlight{margin-bottom:16px}.markdown-body .highlight pre{margin-bottom:0;word-break:normal}.markdown-body .highlight pre,.markdown-body pre{padding:16px;overflow:auto;font-size:85%;line-height:1.45;background-color:#f6f8fa;border-radius:3px}.markdown-body pre code{display:inline;max-width:auto;padding:0;margin:0;overflow:visible;line-height:inherit;word-wrap:normal;background-color:transparent;border:0}.markdown-body pre code::after,.markdown-body pre code::before{content:normal}.markdown-body .full-commit .btn-outline:not(:disabled):hover{color:#005cc5;border-color:#005cc5}.markdown-body kbd{box-shadow:inset 0 -1px 0 #959da5;display:inline-block;padding:3px 5px;font:11px/10px SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;color:#444d56;vertical-align:middle;background-color:#fcfcfc;border:1px solid #c6cbd1;border-bottom-color:#959da5;border-radius:3px;box-shadow:inset 0 -1px 0 #959da5}.markdown-body :checked+.radio-label{position:relative;z-index:1;border-color:#0366d6}.markdown-body .task-list-item{list-style-type:none}.markdown-body .task-list-item+.task-list-item{margin-top:3px}.markdown-body .task-list-item input{margin:0 .2em .25em -1.6em;vertical-align:middle}.markdown-body::before{display:table;content:""}.markdown-body::after{display:table;clear:both;content:""}.markdown-body>:first-child{margin-top:0!important}.markdown-body>:last-child{margin-bottom:0!important}.Alert,.Error,.Note,.Success,.Warning{padding:11px;margin-bottom:24px;border-style:solid;border-width:1px;border-radius:4px}.Alert p,.Error p,.Note p,.Success p,.Warning p{margin-top:0}.Alert p:last-child,.Error p:last-child,.Note p:last-child,.Success p:last-child,.Warning p:last-child{margin-bottom:0}.Alert{color:#246;background-color:#e2eef9;border-color:#bac6d3}.Warning{color:#4c4a42;background-color:#fff9ea;border-color:#dfd8c2}.Error{color:#911;background-color:#fcdede;border-color:#d2b2b2}.Success{color:#22662c;background-color:#e2f9e5;border-color:#bad3be}.Note{color:#2f363d;background-color:#f6f8fa;border-color:#d5d8da}.Alert h1,.Alert h2,.Alert h3,.Alert h4,.Alert h5,.Alert h6{color:#246;margin-bottom:0}.Warning h1,.Warning h2,.Warning h3,.Warning h4,.Warning h5,.Warning h6{color:#4c4a42;margin-bottom:0}.Error h1,.Error h2,.Error h3,.Error h4,.Error h5,.Error h6{color:#911;margin-bottom:0}.Success h1,.Success h2,.Success h3,.Success h4,.Success h5,.Success h6{color:#22662c;margin-bottom:0}.Note h1,.Note h2,.Note h3,.Note h4,.Note h5,.Note h6{color:#2f363d;margin-bottom:0}.Alert h1:first-child,.Alert h2:first-child,.Alert h3:first-child,.Alert h4:first-child,.Alert h5:first-child,.Alert h6:first-child,.Error h1:first-child,.Error h2:first-child,.Error h3:first-child,.Error h4:first-child,.Error h5:first-child,.Error h6:first-child,.Note h1:first-child,.Note h2:first-child,.Note h3:first-child,.Note h4:first-child,.Note h5:first-child,.Note h6:first-child,.Success h1:first-child,.Success h2:first-child,.Success h3:first-child,.Success h4:first-child,.Success h5:first-child,.Success h6:first-child,.Warning h1:first-child,.Warning h2:first-child,.Warning h3:first-child,.Warning h4:first-child,.Warning h5:first-child,.Warning h6:first-child{margin-top:0}h1.title,p.subtitle{text-align:center}h1.title.followed-by-subtitle{margin-bottom:0}p.subtitle{font-size:1.5em;font-weight:600;line-height:1.25;margin-top:0;margin-bottom:16px;padding-bottom:.3em}div.line-block{white-space:pre-line}
</style>
<style type="text/css">code{white-space: pre;}</style>
<style type="text/css">
pre > code.sourceCode { white-space: pre; position: relative; }
pre > code.sourceCode > span { line-height: 1.25; }
pre > code.sourceCode > span:empty { height: 1.2em; }
.sourceCode { overflow: visible; }
code.sourceCode > span { color: inherit; text-decoration: inherit; }
div.sourceCode { margin: 1em 0; }
pre.sourceCode { margin: 0; }
@media screen {
div.sourceCode { overflow: auto; }
}
@media print {
pre > code.sourceCode { white-space: pre-wrap; }
pre > code.sourceCode > span { display: inline-block; text-indent: -5em; padding-left: 5em; }
}
pre.numberSource code
{ counter-reset: source-line 0; }
pre.numberSource code > span
{ position: relative; left: -4em; counter-increment: source-line; }
pre.numberSource code > span > a:first-child::before
{ content: counter(source-line);
position: relative; left: -1em; text-align: right; vertical-align: baseline;
border: none; display: inline-block;
-webkit-touch-callout: none; -webkit-user-select: none;
-khtml-user-select: none; -moz-user-select: none;
-ms-user-select: none; user-select: none;
padding: 0 4px; width: 4em;
color: #aaaaaa;
}
pre.numberSource { margin-left: 3em; border-left: 1px solid #aaaaaa; padding-left: 4px; }
div.sourceCode
{ }
@media screen {
pre > code.sourceCode > span > a:first-child::before { text-decoration: underline; }
}
code span.al { color: #ff0000; font-weight: bold; } /* Alert */
code span.an { color: #60a0b0; font-weight: bold; font-style: italic; } /* Annotation */
code span.at { color: #7d9029; } /* Attribute */
code span.bn { color: #40a070; } /* BaseN */
code span.bu { color: #008000; } /* BuiltIn */
code span.cf { color: #007020; font-weight: bold; } /* ControlFlow */
code span.ch { color: #4070a0; } /* Char */
code span.cn { color: #880000; } /* Constant */
code span.co { color: #60a0b0; font-style: italic; } /* Comment */
code span.cv { color: #60a0b0; font-weight: bold; font-style: italic; } /* CommentVar */
code span.do { color: #ba2121; font-style: italic; } /* Documentation */
code span.dt { color: #902000; } /* DataType */
code span.dv { color: #40a070; } /* DecVal */
code span.er { color: #ff0000; font-weight: bold; } /* Error */
code span.ex { } /* Extension */
code span.fl { color: #40a070; } /* Float */
code span.fu { color: #06287e; } /* Function */
code span.im { color: #008000; font-weight: bold; } /* Import */
code span.in { color: #60a0b0; font-weight: bold; font-style: italic; } /* Information */
code span.kw { color: #007020; font-weight: bold; } /* Keyword */
code span.op { color: #666666; } /* Operator */
code span.ot { color: #007020; } /* Other */
code span.pp { color: #bc7a00; } /* Preprocessor */
code span.sc { color: #4070a0; } /* SpecialChar */
code span.ss { color: #bb6688; } /* SpecialString */
code span.st { color: #4070a0; } /* String */
code span.va { color: #19177c; } /* Variable */
code span.vs { color: #4070a0; } /* VerbatimString */
code span.wa { color: #60a0b0; font-weight: bold; font-style: italic; } /* Warning */
</style>
<!--[if lt IE 9]>
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
<![endif]-->
</head>
<body>
<article class="markdown-body">
<header>
<h1 class="title">Microsoft SQL Server</h1>
</header>
<hr>
<nav id="TOC">
<h1 class="toc-title">Contents</h1>
<ul>
<li><a href="#requirements" id="toc-requirements">Requirements</a></li>
<li><a href="#configuring-general-sql-server-settings"
id="toc-configuring-general-sql-server-settings">Configuring General SQL
Server Settings</a>
<ul>
<li><a href="#general-settings-variables"
id="toc-general-settings-variables">General Settings Variables</a>
<ul>
<li><a href="#mssql_accept_microsoft_odbc_driver_for_sql_server_eula"
id="toc-mssql_accept_microsoft_odbc_driver_for_sql_server_eula">mssql_accept_microsoft_odbc_driver_for_sql_server_eula</a></li>
<li><a href="#mssql_accept_microsoft_cli_utilities_for_sql_server_eula"
id="toc-mssql_accept_microsoft_cli_utilities_for_sql_server_eula">mssql_accept_microsoft_cli_utilities_for_sql_server_eula</a></li>
<li><a href="#mssql_accept_microsoft_sql_server_standard_eula"
id="toc-mssql_accept_microsoft_sql_server_standard_eula">mssql_accept_microsoft_sql_server_standard_eula</a></li>
<li><a href="#mssql_password"
id="toc-mssql_password">mssql_password</a></li>
<li><a href="#mssql_edition"
id="toc-mssql_edition">mssql_edition</a></li>
<li><a href="#mssql_tools_versions"
id="toc-mssql_tools_versions">mssql_tools_versions</a></li>
<li><a href="#mssql_enable_sql_agent"
id="toc-mssql_enable_sql_agent">mssql_enable_sql_agent</a></li>
<li><a href="#mssql_tune_for_fua_storage"
id="toc-mssql_tune_for_fua_storage">mssql_tune_for_fua_storage</a></li>
</ul></li>
<li><a href="#general-settings-example-playbooks"
id="toc-general-settings-example-playbooks">General Settings Example
Playbooks</a>
<ul>
<li><a href="#configuring-basic-sql-server"
id="toc-configuring-basic-sql-server">Configuring Basic SQL
Server</a></li>
</ul></li>
</ul></li>
<li><a href="#managing-sql-server-version"
id="toc-managing-sql-server-version">Managing SQL Server version</a>
<ul>
<li><a href="#managing-version-considerations"
id="toc-managing-version-considerations">Managing Version
Considerations</a></li>
<li><a href="#managing-version-variables"
id="toc-managing-version-variables">Managing Version Variables</a>
<ul>
<li><a href="#mssql_version"
id="toc-mssql_version">mssql_version</a></li>
<li><a href="#mssql_upgrade"
id="toc-mssql_upgrade">mssql_upgrade</a></li>
</ul></li>
</ul></li>
<li><a href="#configuring-sql-server-as-a-confined-application-el-9"
id="toc-configuring-sql-server-as-a-confined-application-el-9">Configuring
SQL Server as a Confined Application (EL 9)</a>
<ul>
<li><a
href="#configuring-sql-server-as-a-confined-application-variables"
id="toc-configuring-sql-server-as-a-confined-application-variables">Configuring
SQL Server as a Confined Application Variables</a>
<ul>
<li><a href="#mssql_run_selinux_confined"
id="toc-mssql_run_selinux_confined">mssql_run_selinux_confined</a></li>
<li><a href="#mssql_manage_selinux"
id="toc-mssql_manage_selinux">mssql_manage_selinux</a></li>
</ul></li>
<li><a
href="#configuring-sql-server-as-a-confined-application-example-playbook"
id="toc-configuring-sql-server-as-a-confined-application-example-playbook">Configuring
SQL Server as a Confined Application Example Playbook</a></li>
</ul></li>
<li><a href="#inputting-sql-scripts-to-sql-server"
id="toc-inputting-sql-scripts-to-sql-server">Inputting SQL Scripts to
SQL Server</a>
<ul>
<li><a href="#inputting-sql-scripts-variables"
id="toc-inputting-sql-scripts-variables">Inputting SQL Scripts
Variables</a>
<ul>
<li><a href="#mssql_input_sql_file"
id="toc-mssql_input_sql_file">mssql_input_sql_file</a></li>
<li><a href="#mssql_pre_input_sql_file-and-mssql_post_input_sql_file"
id="toc-mssql_pre_input_sql_file-and-mssql_post_input_sql_file">mssql_pre_input_sql_file
and mssql_post_input_sql_file</a></li>
<li><a
href="#mssql_pre_input_sql_content-and-mssql_post_input_sql_content"
id="toc-mssql_pre_input_sql_content-and-mssql_post_input_sql_content">mssql_pre_input_sql_content
and mssql_post_input_sql_content</a></li>
<li><a href="#mssql_debug" id="toc-mssql_debug">mssql_debug</a></li>
</ul></li>
<li><a href="#inputting-sql-scripts-example-playbooks"
id="toc-inputting-sql-scripts-example-playbooks">Inputting SQL Scripts
Example Playbooks</a>
<ul>
<li><a href="#inputting-sql-script-files-and-content-to-sql-server"
id="toc-inputting-sql-script-files-and-content-to-sql-server">Inputting
SQL script files and content to SQL Server</a></li>
</ul></li>
</ul></li>
<li><a href="#installing-additional-packages"
id="toc-installing-additional-packages">Installing Additional
Packages</a>
<ul>
<li><a href="#additional-packages-variables"
id="toc-additional-packages-variables">Additional Packages Variables</a>
<ul>
<li><a href="#mssql_install_fts"
id="toc-mssql_install_fts">mssql_install_fts</a></li>
<li><a href="#mssql_install_powershell"
id="toc-mssql_install_powershell">mssql_install_powershell</a></li>
</ul></li>
</ul></li>
<li><a href="#configuring-custom-urls-for-packages"
id="toc-configuring-custom-urls-for-packages">Configuring Custom URLs
for Packages</a>
<ul>
<li><a href="#custom-urls-variables"
id="toc-custom-urls-variables">Custom URLs Variables</a>
<ul>
<li><a href="#mssql_rpm_key"
id="toc-mssql_rpm_key">mssql_rpm_key</a></li>
<li><a href="#mssql_server_repository"
id="toc-mssql_server_repository">mssql_server_repository</a></li>
<li><a href="#mssql_client_repository"
id="toc-mssql_client_repository">mssql_client_repository</a></li>
</ul></li>
</ul></li>
<li><a href="#configuring-custom-data-and-logs-storage-paths"
id="toc-configuring-custom-data-and-logs-storage-paths">Configuring
Custom Data and Logs Storage Paths</a>
<ul>
<li><a href="#custom-paths-variables"
id="toc-custom-paths-variables">Custom Paths Variables</a>
<ul>
<li><a href="#mssql_datadir"
id="toc-mssql_datadir">mssql_datadir</a></li>
<li><a href="#mssql_datadir_mode"
id="toc-mssql_datadir_mode">mssql_datadir_mode</a></li>
<li><a href="#mssql_logdir" id="toc-mssql_logdir">mssql_logdir</a></li>
<li><a href="#mssql_logdir_mode"
id="toc-mssql_logdir_mode">mssql_logdir_mode</a></li>
</ul></li>
</ul></li>
<li><a href="#configuring-network-parameters"
id="toc-configuring-network-parameters">Configuring Network
Parameters</a>
<ul>
<li><a href="#network-parameters-variables"
id="toc-network-parameters-variables">Network Parameters Variables</a>
<ul>
<li><a href="#mssql_ip_address"
id="toc-mssql_ip_address">mssql_ip_address</a></li>
<li><a href="#mssql_tcp_port"
id="toc-mssql_tcp_port">mssql_tcp_port</a></li>
<li><a href="#mssql_manage_firewall"
id="toc-mssql_manage_firewall">mssql_manage_firewall</a></li>
</ul></li>
<li><a href="#network-parameters-example-playbooks"
id="toc-network-parameters-example-playbooks">Network Parameters Example
Playbooks</a>
<ul>
<li><a href="#configuring-sql-server-with-custom-network-parameters"
id="toc-configuring-sql-server-with-custom-network-parameters">Configuring
SQL Server with Custom Network Parameters</a></li>
</ul></li>
</ul></li>
<li><a href="#configuring-tls-certificates"
id="toc-configuring-tls-certificates">Configuring TLS Certificates</a>
<ul>
<li><a href="#tls-certificates-variables"
id="toc-tls-certificates-variables">TLS Certificates Variables</a>
<ul>
<li><a href="#mssql_tls_enable"
id="toc-mssql_tls_enable">mssql_tls_enable</a></li>
<li><a href="#mssql_tls_certificates"
id="toc-mssql_tls_certificates">mssql_tls_certificates</a></li>
<li><a href="#mssql_tls_cert-and-mssql_tls_private_key"
id="toc-mssql_tls_cert-and-mssql_tls_private_key">mssql_tls_cert and
mssql_tls_private_key</a></li>
<li><a href="#mssql_tls_remote_src"
id="toc-mssql_tls_remote_src">mssql_tls_remote_src</a></li>
<li><a href="#mssql_tls_version"
id="toc-mssql_tls_version">mssql_tls_version</a></li>
<li><a href="#mssql_tls_force"
id="toc-mssql_tls_force">mssql_tls_force</a></li>
<li><a href="#mssql_tls_self_sign"
id="toc-mssql_tls_self_sign">mssql_tls_self_sign</a></li>
</ul></li>
<li><a href="#tls-certificates-example-playbooks"
id="toc-tls-certificates-example-playbooks">TLS Certificates Example
Playbooks</a>
<ul>
<li><a
href="#configuring-sql-server-with-tls-encryption-with-certificate-files"
id="toc-configuring-sql-server-with-tls-encryption-with-certificate-files">Configuring
SQL Server with TLS Encryption with Certificate Files</a></li>
<li><a
href="#configuring-sql-server-with-tls-encryption-with-the-certificate-role"
id="toc-configuring-sql-server-with-tls-encryption-with-the-certificate-role">Configuring
SQL Server with TLS Encryption with the Certificate Role</a></li>
</ul></li>
</ul></li>
<li><a href="#configuring-always-on-availability-group"
id="toc-configuring-always-on-availability-group">Configuring Always On
Availability Group</a>
<ul>
<li><a href="#always-on-availability-group-prerequisites"
id="toc-always-on-availability-group-prerequisites">Always On
Availability Group Prerequisites</a></li>
<li><a href="#configuring-the-ansible-inventory"
id="toc-configuring-the-ansible-inventory">Configuring the Ansible
Inventory</a></li>
<li><a href="#always-on-availability-group-variables"
id="toc-always-on-availability-group-variables">Always On Availability
Group Variables</a>
<ul>
<li><a href="#mssql_ha_configure"
id="toc-mssql_ha_configure">mssql_ha_configure</a></li>
<li><a href="#mssql_ha_ag_cluster_type"
id="toc-mssql_ha_ag_cluster_type">mssql_ha_ag_cluster_type</a></li>
<li><a href="#mssql_ha_replica_type"
id="toc-mssql_ha_replica_type">mssql_ha_replica_type</a></li>
<li><a href="#mssql_ha_endpoint_port"
id="toc-mssql_ha_endpoint_port">mssql_ha_endpoint_port</a></li>
<li><a href="#mssql_ha_cert_name"
id="toc-mssql_ha_cert_name">mssql_ha_cert_name</a></li>
<li><a href="#mssql_ha_master_key_password"
id="toc-mssql_ha_master_key_password">mssql_ha_master_key_password</a></li>
<li><a href="#mssql_ha_private_key_password"
id="toc-mssql_ha_private_key_password">mssql_ha_private_key_password</a></li>
<li><a href="#mssql_ha_reset_cert"
id="toc-mssql_ha_reset_cert">mssql_ha_reset_cert</a></li>
<li><a href="#mssql_ha_endpoint_name"
id="toc-mssql_ha_endpoint_name">mssql_ha_endpoint_name</a></li>
<li><a href="#mssql_ha_ag_name"
id="toc-mssql_ha_ag_name">mssql_ha_ag_name</a></li>
<li><a href="#mssql_ha_db_names"
id="toc-mssql_ha_db_names">mssql_ha_db_names</a></li>
</ul></li>
<li><a href="#configuring-pacemaker-variables"
id="toc-configuring-pacemaker-variables">Configuring Pacemaker
Variables</a>
<ul>
<li><a href="#mssql_ha_prep_for_pacemaker"
id="toc-mssql_ha_prep_for_pacemaker">mssql_ha_prep_for_pacemaker</a></li>
<li><a href="#mssql_ha_virtual_ip"
id="toc-mssql_ha_virtual_ip">mssql_ha_virtual_ip</a></li>
<li><a href="#mssql_ha_login"
id="toc-mssql_ha_login">mssql_ha_login</a></li>
<li><a href="#mssql_ha_login_password"
id="toc-mssql_ha_login_password">mssql_ha_login_password</a></li>
<li><a href="#mssql_manage_ha_cluster"
id="toc-mssql_manage_ha_cluster">mssql_manage_ha_cluster</a></li>
</ul></li>
<li><a href="#always-on-availability-group-example-playbooks"
id="toc-always-on-availability-group-example-playbooks">Always On
Availability Group Example Playbooks</a>
<ul>
<li><a href="#example-inventory-for-ha-configuration"
id="toc-example-inventory-for-ha-configuration">Example Inventory for HA
Configuration</a></li>
<li><a
href="#configuring-sql-server-with-a-none-cluster-type-for-read-scale-without-pacemaker"
id="toc-configuring-sql-server-with-a-none-cluster-type-for-read-scale-without-pacemaker">Configuring
SQL Server with a <code>none</code> Cluster Type for Read-scale without
Pacemaker</a></li>
<li><a
href="#configuring-sql-server-with-ha-and-pacemaker-on-bare-metal"
id="toc-configuring-sql-server-with-ha-and-pacemaker-on-bare-metal">Configuring
SQL Server with HA and Pacemaker on Bare Metal</a></li>
<li><a href="#configuring-sql-server-with-ha-and-pacemaker-on-vmware"
id="toc-configuring-sql-server-with-ha-and-pacemaker-on-vmware">Configuring
SQL Server with HA and Pacemaker on VMWare</a></li>
<li><a href="#configuring-sql-server-with-ha-and-pacemaker-on-azure"
id="toc-configuring-sql-server-with-ha-and-pacemaker-on-azure">Configuring
SQL Server with HA and Pacemaker on Azure</a></li>
<li><a href="#ha-and-pacemaker-on-azure-prerequisites"
id="toc-ha-and-pacemaker-on-azure-prerequisites">HA and Pacemaker on
Azure Prerequisites</a></li>
</ul></li>
</ul></li>
<li><a
href="#configuring-sql-server-to-authenticate-with-active-directory-ad-server"
id="toc-configuring-sql-server-to-authenticate-with-active-directory-ad-server">Configuring
SQL Server to authenticate with Active Directory (AD) Server</a>
<ul>
<li><a href="#ad-considerations" id="toc-ad-considerations">AD
Considerations</a></li>
<li><a href="#ad-prerequisites" id="toc-ad-prerequisites">AD
Prerequisites</a></li>
<li><a href="#finishing-ad-server-configuration"
id="toc-finishing-ad-server-configuration">Finishing AD Server
Configuration</a></li>
<li><a href="#verifying-authentication"
id="toc-verifying-authentication">Verifying Authentication</a></li>
<li><a href="#ad-variables" id="toc-ad-variables">AD Variables</a>
<ul>
<li><a href="#mssql_ad_configure"
id="toc-mssql_ad_configure">mssql_ad_configure</a></li>
<li><a href="#mssql_ad_join"
id="toc-mssql_ad_join">mssql_ad_join</a></li>
<li><a href="#mssql_ad_kerberos_user"
id="toc-mssql_ad_kerberos_user">mssql_ad_kerberos_user</a></li>
<li><a href="#mssql_ad_kerberos_password"
id="toc-mssql_ad_kerberos_password">mssql_ad_kerberos_password</a></li>
<li><a href="#mssql_ad_keytab_file"
id="toc-mssql_ad_keytab_file">mssql_ad_keytab_file</a></li>
<li><a href="#mssql_ad_keytab_remote_src"
id="toc-mssql_ad_keytab_remote_src">mssql_ad_keytab_remote_src</a></li>
<li><a href="#mssql_ad_sql_user"
id="toc-mssql_ad_sql_user">mssql_ad_sql_user</a></li>
<li><a href="#mssql_ad_sql_password"
id="toc-mssql_ad_sql_password">mssql_ad_sql_password</a></li>
<li><a href="#mssql_ad_sql_user_dn"
id="toc-mssql_ad_sql_user_dn">mssql_ad_sql_user_dn</a></li>
</ul></li>
<li><a href="#ad-example-playbooks" id="toc-ad-example-playbooks">AD
Example Playbooks</a>
<ul>
<li><a href="#configuring-ad-integration-with-general-parameters"
id="toc-configuring-ad-integration-with-general-parameters">Configuring
AD integration with general parameters</a></li>
<li><a href="#configuring-ad-integration-with-a-pre-created-keytab-file"
id="toc-configuring-ad-integration-with-a-pre-created-keytab-file">Configuring
AD integration with a pre-created keytab file</a></li>
<li><a href="#configuring-ad-integration-without-joining-to-ad"
id="toc-configuring-ad-integration-without-joining-to-ad">Configuring AD
integration without joining to AD</a></li>
</ul></li>
</ul></li>
<li><a href="#license" id="toc-license">License</a></li>
</ul>
</nav>
<hr>
<p>This role installs, configures, and starts Microsoft SQL Server.</p>
<p>The role also optimizes the operating system to improve performance
and throughput for SQL Server by applying the <code>mssql</code> Tuned
profile.</p>
<h1 id="requirements">Requirements</h1>
<ul>
<li>SQL Server requires a machine with at least 2000 megabytes of
memory.</li>
<li>Optional: If you want to input T-SQL statements and stored
procedures to SQL Server, you must create a file with the
<code>.sql</code> extension containing these SQL statements and
procedures.</li>
</ul>
<h1 id="configuring-general-sql-server-settings">Configuring General SQL
Server Settings</h1>
<p>These variables apply to general SQL Server configuration.</p>
<h2 id="general-settings-variables">General Settings Variables</h2>
<h3
id="mssql_accept_microsoft_odbc_driver_for_sql_server_eula">mssql_accept_microsoft_odbc_driver_for_sql_server_eula</h3>
<p>Set this variable to <code>true</code> to indicate that you accept
EULA for installing packages <code>msodbcsql17</code>,
<code>msodbcsql18</code>.</p>
<p>The license terms for this product can be found in the following
places:</p>
<ul>
<li>For version 17, online at <a
href="https://aka.ms/odbc17eula">https://aka.ms/odbc17eula</a> and
locally in <code>/usr/share/doc/msodbcsql17/LICENSE.txt</code>.</li>
<li>For version 18, online at <a
href="https://aka.ms/odbc18eula">https://aka.ms/odbc18eula</a> and
locally in <code>/usr/share/doc/msodbcsql18/LICENSE.txt</code>.</li>
</ul>
<p>Default: <code>false</code></p>
<p>Type: <code>bool</code></p>
<h3
id="mssql_accept_microsoft_cli_utilities_for_sql_server_eula">mssql_accept_microsoft_cli_utilities_for_sql_server_eula</h3>
<p>Set this variable to <code>true</code> to indicate that you accept
EULA for installing the <code>mssql-tools</code> package.</p>
<p>The license terms for this product can be downloaded from <a
href="http://go.microsoft.com/fwlink/?LinkId=746949">http://go.microsoft.com/fwlink/?LinkId=746949</a>
and found in <code>/usr/share/doc/mssql-tools/LICENSE.txt</code>.</p>
<p>Default: <code>false</code></p>
<p>Type: <code>bool</code></p>
<h3
id="mssql_accept_microsoft_sql_server_standard_eula">mssql_accept_microsoft_sql_server_standard_eula</h3>
<p>Set this variable to <code>true</code> to indicate that you accept
EULA for using Microsoft SQL Server.</p>
<p>The license terms for this product can be found in
<code>/usr/share/doc/mssql-server</code> or downloaded from <a
href="https://go.microsoft.com/fwlink/?LinkId=2104078&clcid=0x409">https://go.microsoft.com/fwlink/?LinkId=2104078&clcid=0x409</a>.
The privacy statement can be viewed at <a
href="https://go.microsoft.com/fwlink/?LinkId=853010&clcid=0x409">https://go.microsoft.com/fwlink/?LinkId=853010&clcid=0x409</a>.</p>
<p>Default: <code>false</code></p>
<p>Type: <code>bool</code></p>
<h3 id="mssql_password">mssql_password</h3>
<p>The password for the database sa user. The password must have a
minimum length of 8 characters, include uppercase and lowercase letters,
base 10 digits or non-alphanumeric symbols. Do not use single quotes
('), double quotes ("), and spaces in the password because
<code>sqlcmd</code> cannot authorize when the password includes those
symbols.</p>
<p>This variable is required when you run the role to install SQL
Server.</p>
<p>When running this role on a host that has SQL Server installed, the
<code>mssql_password</code> variable overwrites the existing sa user
password to the one that you specified.</p>
<p>Default: <code>null</code></p>
<p>Type: <code>string</code></p>
<h3 id="mssql_edition">mssql_edition</h3>
<p>The edition of SQL Server to install.</p>
<p>This variable is required when you run the role to install SQL
Server.</p>
<p>Use one of the following values:</p>
<ul>
<li><code>Enterprise</code></li>
<li><code>Standard</code></li>
<li><code>Web</code></li>
<li><code>Developer</code></li>
<li><code>Express</code></li>
<li><code>Evaluation</code></li>
<li>A product key in the form
<code>#####-#####-#####-#####-#####</code>, where <code>#</code> is a
number or a letter. For more information, see <a
href="https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-configure-environment-variables?view=sql-server-ver16">Configure
SQL Server settings with environment variables on Linux</a>.</li>
</ul>
<p>Default: <code>null</code></p>
<p>Type: <code>string</code></p>
<h3 id="mssql_tools_versions">mssql_tools_versions</h3>
<p>List of versions of SQL Tools package (mssql-tools) to install and
use <code>sqlcmd</code> from.</p>
<p>The role uses <code>sqlcmd</code> for the following tasks:</p>
<ul>
<li>Checking password for the sa user.</li>
<li>Running T-SQL scripts with variables <a
href="#mssql_pre_input_sql_file-and-mssql_post_input_sql_file">mssql_pre_input_sql_file
and mssql_post_input_sql_file</a>, <a
href="#mssql_pre_input_sql_content-and-mssql_post_input_sql_content">mssql_pre_input_sql_content
and mssql_post_input_sql_content</a>.</li>
</ul>
<p>By default, installs and uses the latest version 18.</p>
<p>You can set this variable to <code>[17, 18]</code> to install two
versions in parallel. In the case when this variable contains multiple
elements, the role instals both but uses latest provided version.</p>
<p>The role does not remove mssql-tools packages if you unset a version
with this variable.</p>
<p>If you use version 18 and <a
href="#mssql_tls_enable">mssql_tls_enable</a> with self-signed
certificates, you must set <a
href="#mssql_tls_self_sign">mssql_tls_self_sign</a> to
<code>true</code>.</p>
<p>Default: <code>[18]</code></p>
<p>Type: <code>list</code></p>
<h3 id="mssql_enable_sql_agent">mssql_enable_sql_agent</h3>
<p>Optional: Set this variable to <code>true</code> or
<code>false</code> to enable or disable the SQL agent.</p>
<p>Default: <code>null</code></p>
<p>Type: <code>bool</code></p>
<h3 id="mssql_tune_for_fua_storage">mssql_tune_for_fua_storage</h3>
<p>Optional: Set this variable to <code>true</code> or
<code>false</code> to enable or disable settings that improve
performance on hosts that support Forced Unit Access (FUA)
capability.</p>
<p>Only set this variable to <code>true</code> if your hosts are
configured for FUA capability.</p>
<p>When set to <code>true</code>, the role applies the following
settings:</p>
<ul>
<li>Set the <code>traceflag 3979 on</code> setting to enable trace flag
3979 as a startup parameter</li>
<li>Set the <code>control.alternatewritethrough</code> setting to
<code>0</code></li>
<li>Set the <code>control.writethrough</code> setting to
<code>1</code></li>
</ul>
<p>When set to <code>false</code>, the role applies the following
settings:</p>
<ul>
<li>Set the <code>traceflag 3982 off</code> parameter to disable trace
flag 3979 as a startup parameter</li>
<li>Set the <code>control.alternatewritethrough</code> setting to its
default value <code>0</code></li>
<li>Set the <code>control.writethrough</code> setting to its default
value <code>0</code></li>
</ul>
<p>For more details, see SQL Server and Forced Unit Access (FUA) I/O
subsystem capability at <a
href="https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-performance-best-practices?view=sql-server-ver15">Performance
best practices and configuration guidelines for SQL Server on
Linux</a>.</p>
<p>Default: <code>null</code></p>
<p>Type: <code>bool</code></p>
<h2 id="general-settings-example-playbooks">General Settings Example
Playbooks</h2>
<h3 id="configuring-basic-sql-server">Configuring Basic SQL Server</h3>
<p>This example playbook shows how to use the role to configure SQL
Server with the minimum required variables.</p>
<div class="sourceCode" id="cb1"><pre
class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb1-1"><a href="#cb1-1" aria-hidden="true" tabindex="-1"></a><span class="kw">-</span><span class="at"> </span><span class="fu">hosts</span><span class="kw">:</span><span class="at"> all</span></span>
<span id="cb1-2"><a href="#cb1-2" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">vars</span><span class="kw">:</span></span>
<span id="cb1-3"><a href="#cb1-3" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">mssql_accept_microsoft_odbc_driver_for_sql_server_eula</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span></span>
<span id="cb1-4"><a href="#cb1-4" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">mssql_accept_microsoft_cli_utilities_for_sql_server_eula</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span></span>
<span id="cb1-5"><a href="#cb1-5" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">mssql_accept_microsoft_sql_server_standard_eula</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span></span>
<span id="cb1-6"><a href="#cb1-6" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">mssql_version</span><span class="kw">:</span><span class="at"> </span><span class="dv">2019</span></span>
<span id="cb1-7"><a href="#cb1-7" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">mssql_password</span><span class="kw">:</span><span class="at"> </span><span class="st">"p@55w0rD"</span></span>
<span id="cb1-8"><a href="#cb1-8" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">mssql_edition</span><span class="kw">:</span><span class="at"> Evaluation</span></span>
<span id="cb1-9"><a href="#cb1-9" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">roles</span><span class="kw">:</span></span>
<span id="cb1-10"><a href="#cb1-10" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> microsoft.sql.server</span></span></code></pre></div>
<h1 id="managing-sql-server-version">Managing SQL Server version</h1>
<p>Use these variables to manage SQL Server version.</p>
<h2 id="managing-version-considerations">Managing Version
Considerations</h2>
<ul>
<li>The role does not support downgrading SQL Server.</li>
<li>SQL Server does not support a direct upgrade from 2017 to 2022. To
upgrade from 2017 to 2022, you must perform the upgrade in two steps -
upgrade 2017 to 2019 and then 2019 to 2022.</li>
<li>SQL Server 2022 does not support EL 7 hosts.</li>
<li>The role currently supports installing and configuring SQL Server
versions 2017, 2019, and 2022.</li>
</ul>
<h2 id="managing-version-variables">Managing Version Variables</h2>
<h3 id="mssql_version">mssql_version</h3>
<p>The version of the SQL Server to configure.</p>
<p>The role currently supports installing and configuring SQL Server
versions 2017, 2019, and 2022.</p>
<p>If unset, the role sets the variable to the currently installed SQL
Server version.</p>
<p>Note that RHEL 7 does not support SQL Server 2022.</p>
<p>Default: <code>null</code></p>
<p>Type: <code>int</code></p>
<h3 id="mssql_upgrade">mssql_upgrade</h3>
<p>Optional: If you want to upgrade your SQL Server, set this variable
to <code>true</code> and the <code>mssql_version</code> variable to the
version to which you wish to upgrade.</p>
<p>Default: <code>false</code></p>
<p>Type: <code>bool</code></p>
<h1
id="configuring-sql-server-as-a-confined-application-el-9">Configuring
SQL Server as a Confined Application (EL 9)</h1>
<p>Optional: SQL Server on RHEL 9 supports running as a confined
application with SELinux enabled. For more information, see <a
href="https://learn.microsoft.com/en-us/sql/linux/quickstart-install-connect-red-hat?view=sql-server-ver16&tabs=rhel9">Install
SQL Server on RHEL 9</a>.</p>
<p>You can use the role to configure SELinux with the
<code>enforcing</code> mode and install the
<code>mssql-server-selinux</code> package.</p>
<p><strong>WARNING</strong>: SQL Server supports this functionality only
on RHEL 9 running SQL Server version 2022.</p>
<h2
id="configuring-sql-server-as-a-confined-application-variables">Configuring
SQL Server as a Confined Application Variables</h2>
<h3 id="mssql_run_selinux_confined">mssql_run_selinux_confined</h3>
<p>Whether to run SQL Server as a confined application or not.</p>
<ul>
<li>If set to <code>true</code>, the role installs the
<code>mssql-server-selinux</code> package.</li>
<li>If set to <code>false</code>, the role removes the
<code>mssql-server-selinux</code> package.</li>
</ul>
<p>Default: <code>true</code> for RHEL 9 managed nodes
<code>false</code> for not RHEL 9 managed nodes</p>
<p>Type: <code>bool</code></p>
<h3 id="mssql_manage_selinux">mssql_manage_selinux</h3>
<p>Only applicable on RHEL 9 when running as a SELinux-confined
application.</p>
<p>Whether to manage SELinux.</p>
<p>When set to <code>true</code>, configures the following SELinux
contexts and settings:</p>
<ol type="1">
<li>Ensures the <code>mssql_port_t</code> SELinux port type for <a
href="#mssql_tcp_port">mssql_tcp_port</a>.</li>
<li>When you define <a href="#mssql_datadir">mssql_datadir</a> or <a
href="#mssql_logdir">mssql_logdir</a>, configures SELinux context
<code>mssql_db_t</code> for <a href="#mssql_datadir">mssql_datadir</a>
and <code>mssql_var_t</code> for <a
href="#mssql_logdir">mssql_logdir</a>.</li>
<li>When you set <a href="#mssql_ha_configure">mssql_ha_configure</a> to
<code>true</code>, ensures the <code>mssql_port_t</code> SELinux port
type <a href="#mssql_ha_endpoint_port">mssql_ha_endpoint_port</a>.</li>
</ol>
<p>Default: <code>false</code></p>
<p>Type: <code>bool</code></p>
<h2
id="configuring-sql-server-as-a-confined-application-example-playbook">Configuring
SQL Server as a Confined Application Example Playbook</h2>
<p>Run the following playbook against a RHEL 9 system role to configure
SQL Server as a confined application.</p>
<div class="sourceCode" id="cb2"><pre
class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb2-1"><a href="#cb2-1" aria-hidden="true" tabindex="-1"></a><span class="kw">-</span><span class="at"> </span><span class="fu">hosts</span><span class="kw">:</span><span class="at"> all</span></span>
<span id="cb2-2"><a href="#cb2-2" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">vars</span><span class="kw">:</span></span>
<span id="cb2-3"><a href="#cb2-3" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">mssql_accept_microsoft_odbc_driver_for_sql_server_eula</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span></span>
<span id="cb2-4"><a href="#cb2-4" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">mssql_accept_microsoft_cli_utilities_for_sql_server_eula</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span></span>
<span id="cb2-5"><a href="#cb2-5" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">mssql_accept_microsoft_sql_server_standard_eula</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span></span>
<span id="cb2-6"><a href="#cb2-6" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">mssql_version</span><span class="kw">:</span><span class="at"> </span><span class="dv">2022</span></span>
<span id="cb2-7"><a href="#cb2-7" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">mssql_password</span><span class="kw">:</span><span class="at"> </span><span class="st">"p@55w0rD"</span></span>
<span id="cb2-8"><a href="#cb2-8" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">mssql_edition</span><span class="kw">:</span><span class="at"> Evaluation</span></span>
<span id="cb2-9"><a href="#cb2-9" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">mssql_run_selinux_confined</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span></span>
<span id="cb2-10"><a href="#cb2-10" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">mssql_manage_selinux</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span></span></code></pre></div>
<h1 id="inputting-sql-scripts-to-sql-server">Inputting SQL Scripts to
SQL Server</h1>
<p>Optional: You can use the role to input T-SQL statements or
procedures into SQL Server.</p>
<p>You can either input a file containing T-SQL code or the code
directly. You can use on of the following methods:</p>
<ol type="1">
<li>With <a
href="#mssql_pre_input_sql_file-and-mssql_post_input_sql_file">mssql_pre_input_sql_file
and mssql_post_input_sql_file</a>, you can input a file containing T-SQL
code.</li>
<li>With <a
href="#mssql_pre_input_sql_content-and-mssql_post_input_sql_content">mssql_pre_input_sql_content
and mssql_post_input_sql_content</a>, you can input T-SQL code
directly.</li>
</ol>
<p>When specifying any of these variables, you must also specify the
<code>mssql_password</code> variable because authentication is required
to input an SQL file to SQL Server.</p>
<p>Note that the input task is not idempotent, the role always inputs an
SQL file if any of these variables is defined.</p>
<p>You can find an example of an SQL script at the role's
<code>tests/files</code> directory.</p>
<h2 id="inputting-sql-scripts-variables">Inputting SQL Scripts
Variables</h2>
<h3 id="mssql_input_sql_file">mssql_input_sql_file</h3>
<p>This variable is deprecated. Use the below variables instead.</p>
<h3
id="mssql_pre_input_sql_file-and-mssql_post_input_sql_file">mssql_pre_input_sql_file
and mssql_post_input_sql_file</h3>
<p>With these variables, enter the path to the files containing SQL
scripts.</p>
<ul>
<li>Use <code>mssql_pre_input_sql_file</code> to input the SQL file
immediately after the role configures SQL Server.</li>
<li>Use <code>mssql_post_input_sql_file</code> to input the SQL file at
the end of the role invocation.</li>
</ul>
<p>You can set these variables to a list of files, or to a string
containing a single file.</p>
<p>Default: <code>null</code></p>
<p>Type: <code>string</code> or <code>list</code></p>
<h3
id="mssql_pre_input_sql_content-and-mssql_post_input_sql_content">mssql_pre_input_sql_content
and mssql_post_input_sql_content</h3>
<p>With these variables, enter SQL scripts directly.</p>
<ul>
<li>Use <code>mssql_pre_input_sql_content</code> to input SQL scripts
immediately after the role configures SQL Server.</li>
<li>Use <code>mssql_post_input_sql_content</code> to input SQL scripts
at the end of the role invocation.</li>
</ul>
<p>You can set these variables to a list of scripts, or to a string
containing a single script.</p>
<p>Default: <code>null</code></p>
<p>Type: <code>string</code> or <code>list</code></p>
<h3 id="mssql_debug">mssql_debug</h3>
<p>Whether to print the output of sqlcmd commands when inputting T-SQL
statements and procedures.</p>
<p>Default: <code>false</code></p>
<p>Type: <code>bool</code></p>
<h2 id="inputting-sql-scripts-example-playbooks">Inputting SQL Scripts
Example Playbooks</h2>
<h3 id="inputting-sql-script-files-and-content-to-sql-server">Inputting
SQL script files and content to SQL Server</h3>
<div class="sourceCode" id="cb3"><pre
class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb3-1"><a href="#cb3-1" aria-hidden="true" tabindex="-1"></a><span class="kw">-</span><span class="at"> </span><span class="fu">hosts</span><span class="kw">:</span><span class="at"> all</span></span>
<span id="cb3-2"><a href="#cb3-2" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">vars</span><span class="kw">:</span></span>
<span id="cb3-3"><a href="#cb3-3" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">mssql_accept_microsoft_odbc_driver_for_sql_server_eula</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span></span>
<span id="cb3-4"><a href="#cb3-4" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">mssql_accept_microsoft_cli_utilities_for_sql_server_eula</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span></span>
<span id="cb3-5"><a href="#cb3-5" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">mssql_accept_microsoft_sql_server_standard_eula</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span></span>
<span id="cb3-6"><a href="#cb3-6" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">mssql_version</span><span class="kw">:</span><span class="at"> </span><span class="dv">2019</span></span>
<span id="cb3-7"><a href="#cb3-7" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">mssql_password</span><span class="kw">:</span><span class="at"> </span><span class="st">"p@55w0rD"</span></span>
<span id="cb3-8"><a href="#cb3-8" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">mssql_edition</span><span class="kw">:</span><span class="at"> Evaluation</span></span>
<span id="cb3-9"><a href="#cb3-9" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">mssql_pre_input_sql_file</span><span class="kw">:</span><span class="at"> script0.sql</span></span>
<span id="cb3-10"><a href="#cb3-10" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">mssql_post_input_sql_file</span><span class="kw">:</span></span>
<span id="cb3-11"><a href="#cb3-11" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> script1.sql</span></span>
<span id="cb3-12"><a href="#cb3-12" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> script2.sql</span></span>
<span id="cb3-13"><a href="#cb3-13" aria-hidden="true" tabindex="-1"></a><span class="fu"> mssql_pre_input_sql_file</span><span class="kw">: </span><span class="ch">|-</span></span>
<span id="cb3-14"><a href="#cb3-14" aria-hidden="true" tabindex="-1"></a> USE master;</span>
<span id="cb3-15"><a href="#cb3-15" aria-hidden="true" tabindex="-1"></a> IF NOT EXISTS (</span>
<span id="cb3-16"><a href="#cb3-16" aria-hidden="true" tabindex="-1"></a> SELECT name FROM sys.server_principals</span>
<span id="cb3-17"><a href="#cb3-17" aria-hidden="true" tabindex="-1"></a> WHERE name = '<mydomain>\<myADlogin>'</span>
<span id="cb3-18"><a href="#cb3-18" aria-hidden="true" tabindex="-1"></a> )</span>
<span id="cb3-19"><a href="#cb3-19" aria-hidden="true" tabindex="-1"></a> BEGIN</span>
<span id="cb3-20"><a href="#cb3-20" aria-hidden="true" tabindex="-1"></a> PRINT 'A <mydomain>\<myADlogin> login does not exist, creating';</span>
<span id="cb3-21"><a href="#cb3-21" aria-hidden="true" tabindex="-1"></a> CREATE LOGIN [<mydomain>\<myADlogin>] FROM WINDOWS;</span>
<span id="cb3-22"><a href="#cb3-22" aria-hidden="true" tabindex="-1"></a> PRINT 'The <mydomain>\<myADlogin> login created successfully';</span>
<span id="cb3-23"><a href="#cb3-23" aria-hidden="true" tabindex="-1"></a> END</span>
<span id="cb3-24"><a href="#cb3-24" aria-hidden="true" tabindex="-1"></a> ELSE</span>
<span id="cb3-25"><a href="#cb3-25" aria-hidden="true" tabindex="-1"></a> BEGIN</span>
<span id="cb3-26"><a href="#cb3-26" aria-hidden="true" tabindex="-1"></a> PRINT 'A <mydomain>\<myADlogin> login already exists, skipping'</span>
<span id="cb3-27"><a href="#cb3-27" aria-hidden="true" tabindex="-1"></a> END</span>
<span id="cb3-28"><a href="#cb3-28" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">mssql_post_input_sql_file</span><span class="kw">:</span></span>
<span id="cb3-29"><a href="#cb3-29" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> CREATE DATABASE ExampleDB1</span></span>
<span id="cb3-30"><a href="#cb3-30" aria-hidden="true" tabindex="-1"></a><span class="kw"> - </span><span class="ch">|-</span></span>
<span id="cb3-31"><a href="#cb3-31" aria-hidden="true" tabindex="-1"></a> IF NOT EXISTS(</span>
<span id="cb3-32"><a href="#cb3-32" aria-hidden="true" tabindex="-1"></a> SELECT name</span>
<span id="cb3-33"><a href="#cb3-33" aria-hidden="true" tabindex="-1"></a> FROM sys.databases</span>
<span id="cb3-34"><a href="#cb3-34" aria-hidden="true" tabindex="-1"></a> WHERE name = 'ExampleDB2'</span>
<span id="cb3-35"><a href="#cb3-35" aria-hidden="true" tabindex="-1"></a> )</span>
<span id="cb3-36"><a href="#cb3-36" aria-hidden="true" tabindex="-1"></a> BEGIN</span>
<span id="cb3-37"><a href="#cb3-37" aria-hidden="true" tabindex="-1"></a> PRINT 'Creating the ExampleDB2 database';</span>
<span id="cb3-38"><a href="#cb3-38" aria-hidden="true" tabindex="-1"></a> CREATE DATABASE ExampleDB2;</span>
<span id="cb3-39"><a href="#cb3-39" aria-hidden="true" tabindex="-1"></a> PRINT 'The ExampleDB2 database created successfully';</span>
<span id="cb3-40"><a href="#cb3-40" aria-hidden="true" tabindex="-1"></a> END</span>
<span id="cb3-41"><a href="#cb3-41" aria-hidden="true" tabindex="-1"></a> ELSE</span>
<span id="cb3-42"><a href="#cb3-42" aria-hidden="true" tabindex="-1"></a> BEGIN</span>
<span id="cb3-43"><a href="#cb3-43" aria-hidden="true" tabindex="-1"></a> PRINT 'The ExampleDB2 database already exists, skipping';</span>
<span id="cb3-44"><a href="#cb3-44" aria-hidden="true" tabindex="-1"></a> END</span>
<span id="cb3-45"><a href="#cb3-45" aria-hidden="true" tabindex="-1"></a> GO</span></code></pre></div>
<h1 id="installing-additional-packages">Installing Additional
Packages</h1>
<p>Optional: Use these variables to install additional packages to SQL
Server host.</p>
<h2 id="additional-packages-variables">Additional Packages
Variables</h2>
<h3 id="mssql_install_fts">mssql_install_fts</h3>
<p>Set this variable to <code>true</code> or <code>false</code> to
install or remove the <code>mssql-server-fts</code> package that
provides full-text search.</p>
<p>Default: <code>null</code></p>
<p>Type: <code>bool</code></p>
<h3 id="mssql_install_powershell">mssql_install_powershell</h3>
<p>Set this variable to <code>true</code> or <code>false</code> to
install or remove the <code>powershell</code> package that provides
PowerShell.</p>
<p>Default: <code>null</code></p>
<p>Type: <code>bool</code></p>
<h1 id="configuring-custom-urls-for-packages">Configuring Custom URLs
for Packages</h1>
<p>Optional: Use these variables to configure your host to get packages
from custom URLs. This is useful if you store packages in a proxy
server.</p>
<p>When you do not provide these variables, the role uses default values
from the <code>vars/</code> directory based on operating system.</p>
<h2 id="custom-urls-variables">Custom URLs Variables</h2>
<h3 id="mssql_rpm_key">mssql_rpm_key</h3>
<p>The URL or path to the Microsoft rpm gpg keys.</p>
<p>Default:
<code>https://packages.microsoft.com/keys/microsoft.asc</code></p>
<p>Type: <code>string</code></p>
<h3 id="mssql_server_repository">mssql_server_repository</h3>
<p>The URL to the Microsoft SQL Server repository.</p>
<p>Default: <code>{{ __mssql_server_repository }}</code></p>
<p>Type: <code>string</code></p>
<h3 id="mssql_client_repository">mssql_client_repository</h3>
<p>The URL to the Microsoft production repository.</p>
<p>Default: <code>{{ __mssql_client_repository }}</code></p>
<p>Type: <code>string</code></p>
<h1 id="configuring-custom-data-and-logs-storage-paths">Configuring
Custom Data and Logs Storage Paths</h1>
<p>Optional: Use these variables to configure SQL Server to store data
and logs in custom paths.</p>
<h2 id="custom-paths-variables">Custom Paths Variables</h2>
<p>Use these variables to configure custom storage paths.</p>
<p>On RHEL 9, you can set <a
href="#mssql_manage_selinux">mssql_manage_selinux</a> to
<code>true</code> to set a correct SELinux context for custom
directories.</p>
<h3 id="mssql_datadir">mssql_datadir</h3>
<p>The path to the directory that SQL Server must use to store data.
When defined, the role creates the provided directory and ensures
correct permissions and ownership for it.</p>
<p>Note that if you change this path, the previously used directory and
all it's content remains at the original path.</p>
<p>Default: <code>null</code></p>
<p>Type: <code>string</code></p>
<h3 id="mssql_datadir_mode">mssql_datadir_mode</h3>
<p>The permissions to be set for the <code>mssql_datadir</code> path in
the format of the Ansible <code>file</code> module <code>mode</code>
variable.</p>
<p>Quote the mode like <code>'755'</code> so Ansible parses it as a
string to avoid conflicts with octal numbers.</p>
<p>Default: <code>'755'</code></p>
<p>Type: <code>string</code></p>
<h3 id="mssql_logdir">mssql_logdir</h3>
<p>The path to the directory that SQL Server must use to store logs.
When defined, the role creates the provided directory and ensures
correct permissions and ownership for it.</p>
<p>Note that if you change this path, the previously used directory and
all it's content remains at the original path.</p>
<p>Default: <code>null</code></p>
<p>Type: <code>string</code></p>
<h3 id="mssql_logdir_mode">mssql_logdir_mode</h3>
<p>The permissions to be set for the <code>mssql_logdir</code> path in
the format of the Ansible <code>file</code> module <code>mode</code>
variable.</p>
<p>Quote the mode like <code>'755'</code> so Ansible parses it as a
string to avoid conflicts with octal numbers.</p>
<p>Default: <code>'755'</code></p>
<p>Type: <code>string</code></p>
<h1 id="configuring-network-parameters">Configuring Network
Parameters</h1>
<p>Use these variables to configure TCP port settings.</p>
<h2 id="network-parameters-variables">Network Parameters Variables</h2>
<h3 id="mssql_ip_address">mssql_ip_address</h3>
<p>The IP address that SQL Server listens on.</p>
<p>If you define this variable, the role configures SQL Server with the
defined IP address.</p>
<p>If you do not define this variable when installing SQL Server, the
role configures SQL Server to listen on the SQL Server default IP
address <code>0.0.0.0</code>, that is, to listen on every available
network interface.</p>
<p>If you do not define this variable when configuring running SQL
Server, the role does not change the IP address setting on SQL
Server.</p>
<p>Default: <code>null</code></p>
<p>Type: <code>string</code></p>
<h3 id="mssql_tcp_port">mssql_tcp_port</h3>
<p>The port that SQL Server listens on.</p>
<p>If you set <code>mssql_manage_firewall</code> to <code>false</code>,
you must open the firewall port defined with the
<code>mssql_tcp_port</code> variable prior to running this role.</p>
<p>You can change the TCP port by setting this variable to a different
port. If you set <code>mssql_manage_firewall</code> to <code>true</code>
while changing the TCP port, the role closes the previously opened
firewall port.</p>
<p>Default: <code>1433</code></p>
<p>Type: <code>int</code></p>
<h3 id="mssql_manage_firewall">mssql_manage_firewall</h3>
<p>Whether to open firewall ports required by this role.</p>
<p>When this variable is set to <code>true</code>, the role enables
firewall even if it was not enabled.</p>
<p>The role uses the <code>fedora.linux_system_roles.firewall</code>
role to manage the firewall, hence, only firewall implementations
supported by the <code>fedora.linux_system_roles.firewall</code> role
work.</p>
<p>If you set this variable to <code>false</code>, you must open
required ports prior to running this role.</p>
<p>Default: <code>false</code></p>
<p>Type: <code>bool</code></p>
<h2 id="network-parameters-example-playbooks">Network Parameters Example
Playbooks</h2>
<h3
id="configuring-sql-server-with-custom-network-parameters">Configuring
SQL Server with Custom Network Parameters</h3>
<p>This example shows how to use the role to configure SQL Server,
configure it with a custom IP address and TCP port, and open the TCP
port in firewall.</p>
<div class="sourceCode" id="cb4"><pre
class="sourceCode yaml"><code class="sourceCode yaml"><span id="cb4-1"><a href="#cb4-1" aria-hidden="true" tabindex="-1"></a><span class="kw">-</span><span class="at"> </span><span class="fu">hosts</span><span class="kw">:</span><span class="at"> all</span></span>
<span id="cb4-2"><a href="#cb4-2" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">vars</span><span class="kw">:</span></span>
<span id="cb4-3"><a href="#cb4-3" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">mssql_accept_microsoft_odbc_driver_for_sql_server_eula</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span></span>
<span id="cb4-4"><a href="#cb4-4" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">mssql_accept_microsoft_cli_utilities_for_sql_server_eula</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span></span>
<span id="cb4-5"><a href="#cb4-5" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">mssql_accept_microsoft_sql_server_standard_eula</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span></span>
<span id="cb4-6"><a href="#cb4-6" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">mssql_version</span><span class="kw">:</span><span class="at"> </span><span class="dv">2019</span></span>
<span id="cb4-7"><a href="#cb4-7" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">mssql_password</span><span class="kw">:</span><span class="at"> </span><span class="st">"p@55w0rD"</span></span>
<span id="cb4-8"><a href="#cb4-8" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">mssql_edition</span><span class="kw">:</span><span class="at"> Evaluation</span></span>
<span id="cb4-9"><a href="#cb4-9" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">mssql_tcp_port</span><span class="kw">:</span><span class="at"> </span><span class="dv">1433</span></span>
<span id="cb4-10"><a href="#cb4-10" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">mssql_ip_address</span><span class="kw">:</span><span class="at"> </span><span class="fl">0.0.0.0</span></span>
<span id="cb4-11"><a href="#cb4-11" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">mssql_manage_firewall</span><span class="kw">:</span><span class="at"> </span><span class="ch">true</span></span>
<span id="cb4-12"><a href="#cb4-12" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="fu">roles</span><span class="kw">:</span></span>
<span id="cb4-13"><a href="#cb4-13" aria-hidden="true" tabindex="-1"></a><span class="at"> </span><span class="kw">-</span><span class="at"> microsoft.sql.server</span></span></code></pre></div>
<h1 id="configuring-tls-certificates">Configuring TLS Certificates</h1>
<p>Use the variables starting with the <code>mssql_tls_</code> prefix to
configure SQL Server to encrypt connections using TLS certificates.</p>
<p>You can either use existing TLS certificate and private key files by
providing them with <a
href="#mssql_tls_cert-and-mssql_tls_private_key">mssql_tls_cert<code>and</code>mssql_tls_private_key</a>,
or use the role to create certificates by providing <a
href="#mssql_tls_certificates">mssql_tls_certificates</a>.</p>
<h2 id="tls-certificates-variables">TLS Certificates Variables</h2>
<h3 id="mssql_tls_enable">mssql_tls_enable</h3>
<p>Set to <code>true</code> or <code>false</code> to enable or disable
TLS encryption.</p>
<p>When set to <code>true</code>, the role performs the following
tasks:</p>
<ol type="1">
<li>Copies or generates TLS certificate and private key files in
<code>/etc/pki/tls/certs/</code> and <code>/etc/pki/tls/private/</code>
directories respectively</li>
<li>Configures SQL Server to encrypt connections using TLS certificate