Debian Codegraph @

ansible_collections/lowlydba/sqlserver/plugins/modules/dba_multitool.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: dba_multitool
10 short_description: Install/update the DBA Multitool suite by John McCall
11 description:
12 - A wrapper for C(Install-DbaMultiTool) to fetch the latest version of the scripts, or install from a local cached version.
13 version_added: 0.7.0
14 options:
15 sql_instance:
16 description:
17 - The target SQL Server instance or instances. Server version must be SQL Server version 2005 or higher.
18 type: str
19 required: true
20 local_file:
21 description:
22 - Specifies the path to a local file to install DBA MultiTool from. This should be the zip file as distributed by the maintainers.
23 - If this option is not specified, the latest version will be downloaded and installed from https://github.com/LowlyDBA/dba-multitool/.
24 type: str
25 required: false
26 branch:
27 description:
28 - Specifies an alternate branch of the DBA MultiTool to install.
29 type: str
30 required: false
31 choices: ['master', 'development']
32 database:
33 description:
34 - Name of the target database.
35 type: str
36 required: true
37 force:
38 description:
39 - If this switch is enabled, the DBA MultiTool will be downloaded from the internet even if previously cached.
40 type: bool
41 default: false
42 author: "John McCall (@lowlydba)"
43 requirements:
44 - L(dbatools,https://www.powershellgallery.com/packages/dbatools/) PowerShell module
45 extends_documentation_fragment:
46 - lowlydba.sqlserver.sql_credentials
47 - lowlydba.sqlserver.attributes.check_mode
48 - lowlydba.sqlserver.attributes.platform_all
49 '''
50
51 EXAMPLES = r'''
52 - name: Install DBA MultiTool
53 lowlydba.sqlserver.dba_multitool:
54 sql_instance: test-server.my.company.com
55 database: dba_tools
56 '''
57
58 RETURN = r'''
59 data:
60 description: Modified output from the C(Install-DbaMultitool) function.
61 returned: success, but not in check_mode.
62 type: dict
63 '''