Skip to content

Commit 090c667

Browse files
authored
add back url parameter (#92)
* add back url parameter * add docs for url parameter * only define overriden parameters for doc * fix copyright year
1 parent f069851 commit 090c667

17 files changed

Lines changed: 62 additions & 0 deletions
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# -*- coding: utf-8 -*-
2+
#
3+
# Copyright (c) 2021 T-Systems Multimedia Solutions GmbH
4+
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
5+
#
6+
# This module is free software: you can redistribute it and/or modify
7+
# it under the terms of the GNU General Public License as published by
8+
# the Free Software Foundation, either version 3 of the License, or
9+
# (at your option) any later version.
10+
#
11+
# This software is distributed in the hope that it will be useful,
12+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
# GNU General Public License for more details.
15+
#
16+
# You should have received a copy of the GNU General Public License
17+
# along with this software. If not, see <http://www.gnu.org/licenses/>.
18+
19+
from __future__ import absolute_import, division, print_function
20+
21+
__metaclass__ = type
22+
23+
24+
class ModuleDocFragment(object):
25+
# Documentation for common options that are always the same
26+
DOCUMENTATION = r"""
27+
options:
28+
url:
29+
required: true
30+
"""

plugins/modules/icinga_command.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
version_added: '1.0.0'
3838
extends_documentation_fragment:
3939
- ansible.builtin.url
40+
- t_systems_mms.icinga_director.common_options
4041
options:
4142
state:
4243
description:
@@ -189,6 +190,7 @@ def main():
189190
# add our own arguments
190191
argument_spec.update(
191192
state=dict(default="present", choices=["absent", "present"]),
193+
url=dict(required=True),
192194
object_name=dict(required=True, aliases=["name"]),
193195
imports=dict(type="list", elements="str", required=False, default=[]),
194196
disabled=dict(

plugins/modules/icinga_command_template.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
author: Lars Krahl (@mmslkr)
3737
extends_documentation_fragment:
3838
- ansible.builtin.url
39+
- t_systems_mms.icinga_director.common_options
3940
version_added: '1.1.0'
4041
options:
4142
state:
@@ -188,6 +189,7 @@ def main():
188189
# add our own arguments
189190
argument_spec.update(
190191
state=dict(default="present", choices=["absent", "present"]),
192+
url=dict(required=True),
191193
object_name=dict(required=True, aliases=["name"]),
192194
imports=dict(type="list", elements="str", required=False, default=[]),
193195
disabled=dict(

plugins/modules/icinga_endpoint.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
author: Aaron Bulmahn (@arbu)
3737
extends_documentation_fragment:
3838
- ansible.builtin.url
39+
- t_systems_mms.icinga_director.common_options
3940
version_added: '1.5.0'
4041
options:
4142
state:
@@ -107,6 +108,7 @@ def main():
107108
# add our own arguments
108109
argument_spec.update(
109110
state=dict(default="present", choices=["absent", "present"]),
111+
url=dict(required=True),
110112
object_name=dict(required=True, aliases=["name"]),
111113
host=dict(required=False),
112114
port=dict(required=False, type="int"),

plugins/modules/icinga_host.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
author: Sebastian Gumprich (@rndmh3ro)
3737
extends_documentation_fragment:
3838
- ansible.builtin.url
39+
- t_systems_mms.icinga_director.common_options
3940
version_added: '1.0.0'
4041
options:
4142
state:
@@ -190,6 +191,7 @@ def main():
190191
# add our own arguments
191192
argument_spec.update(
192193
state=dict(default="present", choices=["absent", "present"]),
194+
url=dict(required=True),
193195
object_name=dict(required=True, aliases=["name"]),
194196
display_name=dict(required=False),
195197
groups=dict(type="list", elements="str", default=[], required=False),

plugins/modules/icinga_host_template.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
author: Michaela Mattes (@michaelamattes)
3737
extends_documentation_fragment:
3838
- ansible.builtin.url
39+
- t_systems_mms.icinga_director.common_options
3940
version_added: '1.2.0'
4041
options:
4142
state:
@@ -185,6 +186,7 @@ def main():
185186
# add our own arguments
186187
argument_spec.update(
187188
state=dict(default="present", choices=["absent", "present"]),
189+
url=dict(required=True),
188190
object_name=dict(required=True, aliases=["name"]),
189191
display_name=dict(required=False),
190192
groups=dict(type="list", elements="str", default=[], required=False),

plugins/modules/icinga_hostgroup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
author: Sebastian Gumprich (@rndmh3ro)
3737
extends_documentation_fragment:
3838
- ansible.builtin.url
39+
- t_systems_mms.icinga_director.common_options
3940
version_added: '1.0.0'
4041
options:
4142
state:
@@ -96,6 +97,7 @@ def main():
9697
# add our own arguments
9798
argument_spec.update(
9899
state=dict(default="present", choices=["absent", "present"]),
100+
url=dict(required=True),
99101
object_name=dict(required=True, aliases=["name"]),
100102
display_name=dict(required=False),
101103
assign_filter=dict(required=False),

plugins/modules/icinga_notification.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
author: Sebastian Gumprich (@rndmh3ro)
3737
extends_documentation_fragment:
3838
- ansible.builtin.url
39+
- t_systems_mms.icinga_director.common_options
3940
version_added: '1.0.0'
4041
options:
4142
state:
@@ -152,6 +153,7 @@ def main():
152153
# add our own arguments
153154
argument_spec.update(
154155
state=dict(default="present", choices=["absent", "present"]),
156+
url=dict(required=True),
155157
object_name=dict(required=True, aliases=["name"]),
156158
imports=dict(type="list", elements="str", required=False),
157159
apply_to=dict(required=True, choices=["service", "host"]),

plugins/modules/icinga_notification_template.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
author: Sebastian Gumprich (@rndmh3ro)
3737
extends_documentation_fragment:
3838
- ansible.builtin.url
39+
- t_systems_mms.icinga_director.common_options
3940
version_added: "1.9.0"
4041
options:
4142
state:
@@ -125,6 +126,7 @@ def main():
125126
# add our own arguments
126127
argument_spec.update(
127128
state=dict(default="present", choices=["absent", "present"]),
129+
url=dict(required=True),
128130
object_name=dict(required=True, aliases=["name"]),
129131
notification_interval=dict(required=False),
130132
states=dict(type="list", elements="str", required=False),

plugins/modules/icinga_service.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
author: Sebastian Gumprich (@rndmh3ro)
3737
extends_documentation_fragment:
3838
- ansible.builtin.url
39+
- t_systems_mms.icinga_director.common_options
3940
version_added: '1.0.0'
4041
options:
4142
state:
@@ -286,6 +287,7 @@ def main():
286287
# add our own arguments
287288
argument_spec.update(
288289
state=dict(default="present", choices=["absent", "present"]),
290+
url=dict(required=True),
289291
object_name=dict(required=True, aliases=["name"]),
290292
disabled=dict(type="bool", default=False, choices=[True, False]),
291293
check_command=dict(required=False),

0 commit comments

Comments
 (0)