Debian Codegraph @

ansible_collections/lowlydba/sqlserver/plugins/modules/agent_job_category.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: agent_job_category
10 short_description: Configures a SQL Agent job category
11 description:
12 - Configures a SQL Agent job category. Creates if it does not exist, else does nothing.
13 version_added: 0.1.0
14 options:
15 category:
16 description:
17 - Name of the category.
18 required: true
19 type: str
20 category_type:
21 description:
22 - The type of category.
23 required: false
24 type: str
25 choices: ['LocalJob', 'MultiServerJob', 'None']
26 author: "John McCall (@lowlydba)"
27 requirements:
28 - L(dbatools,https://www.powershellgallery.com/packages/dbatools/) PowerShell module
29 extends_documentation_fragment:
30 - lowlydba.sqlserver.sql_credentials
31 - lowlydba.sqlserver.attributes.check_mode
32 - lowlydba.sqlserver.attributes.platform_all
33 - lowlydba.sqlserver.state
34 '''
35
36 EXAMPLES = r'''
37 - name: Create a maintenance job category
38 lowlydba.sqlserver.agent_job_category:
39 sql_instance: sql-01.myco.io
40 category: "Index Maintenance"
41 '''
42
43 RETURN = r'''
44 data:
45 description: Output from the C(New-DbaAgentJobCategory) or C(Remove-DbaAgentJobCategory) function.
46 returned: success, but not in check_mode.
47 type: dict
48 '''