Debian Codegraph @

ansible_collections/lowlydba/sqlserver/plugins/modules/memory.py

raw
1 #!/usr/bin/python
2 # -*- coding: utf-8 -*-
3
4 # (c) 2022, John McCall (@lowlydba)
5 # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
6
7 DOCUMENTATION = r'''
8 ---
9 module: memory
10 short_description: Sets the maximum memory for a SQL Server instance
11 description:
12 - Sets the maximum memory for a SQL Server instance.
13 version_added: 0.1.0
14 options:
15 max:
16 description:
17 - The maximum memory in MB that the SQL Server instance can utilize. C(0) will automatically calculate the ideal value.
18 type: int
19 required: false
20 default: 0
21 author: "John McCall (@lowlydba)"
22 requirements:
23 - L(dbatools,https://www.powershellgallery.com/packages/dbatools/) PowerShell module
24 extends_documentation_fragment:
25 - lowlydba.sqlserver.sql_credentials
26 - lowlydba.sqlserver.attributes.check_mode
27 - lowlydba.sqlserver.attributes.platform_all
28 '''
29
30 EXAMPLES = r'''
31 - name: Automatically configure SQL max memory
32 lowlydba.sqlserver.memory:
33 sql_instance: sql-01.myco.io
34
35 - name: Manually configure SQL max memory
36 lowlydba.sqlserver.memory:
37 sql_instance: sql-01.myco.io
38 max: 10240
39 '''
40
41 RETURN = r'''
42 data:
43 description: Output from the C(Set-DbaMaxMemory) function.
44 returned: success, but not in check_mode.
45 type: dict
46 '''