1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Revert new features since the 2.0.0 release so we can release 2.0.1 from this branch.

Revert "datadog_monitor: Add missing monitor types query alert, trace-analytics alert, rum alert (#1723) (#1733)"
Revert "homebrew_tap: Add support for brew search path (#1708) (#1709)"

This reverts commits f613983cb4 and 646ca74810.
This commit is contained in:
Felix Fontein 2021-02-06 17:47:42 +01:00
parent a90e2c8002
commit 1d90e91528
4 changed files with 6 additions and 28 deletions

View file

@ -1,2 +0,0 @@
minor_changes:
- homebrew_tap - add support to specify search path for ``brew`` executable (https://github.com/ansible-collections/community.general/issues/1702).

View file

@ -1,2 +0,0 @@
minor_changes:
- datadog_monitor - add missing monitor types ``query alert``, ``trace-analytics alert``, ``rum alert`` (https://github.com/ansible-collections/community.general/pull/1723).

View file

@ -49,8 +49,7 @@ options:
type:
description:
- The type of the monitor.
- The types C(query alert), C(trace-analytics alert) and C(rum alert) were added in community.general 2.1.0.
choices: ['metric alert', 'service check', 'event alert', 'process alert', 'log alert', 'query alert', 'trace-analytics alert', 'rum alert']
choices: ['metric alert', 'service check', 'event alert', 'process alert', 'log alert']
type: str
query:
description:
@ -209,9 +208,7 @@ def main():
api_host=dict(required=False),
app_key=dict(required=True, no_log=True),
state=dict(required=True, choices=['present', 'absent', 'mute', 'unmute']),
type=dict(required=False, choices=['metric alert', 'service check', 'event alert',
'process alert', 'log alert', 'query alert',
'trace-analytics alert', 'rum alert']),
type=dict(required=False, choices=['metric alert', 'service check', 'event alert', 'process alert', 'log alert']),
name=dict(required=True),
query=dict(required=False),
notification_message=dict(required=False, no_log=True, default=None, aliases=['message'],
@ -351,7 +348,7 @@ def install_monitor(module):
if module.params['type'] == "service check":
options["thresholds"] = module.params['thresholds'] or {'ok': 1, 'critical': 1, 'warning': 1}
if module.params['type'] in ["metric alert", "log alert", "query alert", "trace-analytics alert", "rum alert"] and module.params['thresholds'] is not None:
if module.params['type'] in ["metric alert", "log alert"] and module.params['thresholds'] is not None:
options["thresholds"] = module.params['thresholds']
monitor = _get_monitor(module)

View file

@ -45,12 +45,6 @@ options:
required: false
default: 'present'
type: str
path:
description:
- "A ':' separated list of paths to search for C(brew) executable."
default: '/usr/local/bin:/opt/homebrew/bin'
type: path
version_added: '2.1.0'
requirements: [ homebrew ]
'''
@ -133,7 +127,7 @@ def add_tap(module, brew_path, tap, url=None):
def add_taps(module, brew_path, taps):
'''Adds one or more taps.'''
failed, changed, unchanged, added, msg = False, False, 0, 0, ''
failed, unchanged, added, msg = False, 0, 0, ''
for tap in taps:
(failed, changed, msg) = add_tap(module, brew_path, tap)
@ -188,7 +182,7 @@ def remove_tap(module, brew_path, tap):
def remove_taps(module, brew_path, taps):
'''Removes one or more taps.'''
failed, changed, unchanged, removed, msg = False, False, 0, 0, ''
failed, unchanged, removed, msg = False, 0, 0, ''
for tap in taps:
(failed, changed, msg) = remove_tap(module, brew_path, tap)
@ -217,23 +211,14 @@ def main():
name=dict(aliases=['tap'], type='list', required=True, elements='str'),
url=dict(default=None, required=False),
state=dict(default='present', choices=['present', 'absent']),
path=dict(
default="/usr/local/bin:/opt/homebrew/bin",
required=False,
type='path',
),
),
supports_check_mode=True,
)
path = module.params['path']
if path:
path = path.split(':')
brew_path = module.get_bin_path(
'brew',
required=True,
opt_dirs=path,
opt_dirs=['/usr/local/bin', '/opt/homebrew/bin']
)
taps = module.params['name']