Skip to content

Commit

Permalink
more lint and syntax fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Lathrop committed May 13, 2024
1 parent 9a418eb commit 30f4bde
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 14 deletions.
6 changes: 3 additions & 3 deletions plugins/modules/zabbix_discoveryrule.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
- Create discoveryrules if they do not exist.
- Delete existing discoveryrules if they exist.
author:
- "Andrew Lathrop"
- "Andrew Lathrop (@aplathrop)"
requirements:
- "python >= 2.6"
Expand Down Expand Up @@ -46,7 +46,7 @@
- Mutually exclusive with I(host_name).
required: false
type: str
params:
params:
description:
- Parameters to create/update discovery rule with.
- Required if state is "present".
Expand All @@ -63,7 +63,7 @@
type: str
interval:
description:
- Update interval of the LLD rule.
- Update interval of the LLD rule.
- Alias for "delay" in API docs
required: false
type: str
Expand Down
3 changes: 2 additions & 1 deletion plugins/modules/zabbix_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
- Create items if they do not exist.
- Delete existing items if they exist.
author:
- "Andrew Lathrop"
- "Andrew Lathrop (@aplathrop)"
requirements:
- "python >= 2.6"
Expand Down Expand Up @@ -511,5 +511,6 @@ def main():
changed = True
module.exit_json(changed=changed, result=results)


if __name__ == '__main__':
main()
5 changes: 3 additions & 2 deletions plugins/modules/zabbix_itemprototype.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
- Create item prototypes if they do not exist.
- Delete existing item prototypes if they exist.
author:
- "Andrew Lathrop"
- "Andrew Lathrop (@aplathrop)"
requirements:
- "python >= 2.6"
Expand Down Expand Up @@ -124,7 +124,8 @@
preprocessing:
description:
- Item preprocessing options.
- Parameters as defined at https://www.zabbix.com/documentation/current/en/manual/api/reference/itemprototype/object#item-prototype-preprocessing
- Parameters as defined at
- https://www.zabbix.com/documentation/current/en/manual/api/reference/itemprototype/object#item-prototype-preprocessing
- Additionally supported parameters are below
required: false
type: list
Expand Down
9 changes: 5 additions & 4 deletions plugins/modules/zabbix_trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
- Create triggers if they do not exist.
- Delete existing triggers if they exist.
author:
- "Andrew Lathrop"
- "Andrew Lathrop (@aplathrop)"
requirements:
- "python >= 2.6"
Expand Down Expand Up @@ -60,6 +60,7 @@
- list of triggers that this trigger is dependent on
required: false
type: list
elements: dict
suboptions:
name:
description:
Expand Down Expand Up @@ -126,7 +127,7 @@
- OK event generation mode.
- Overrides "recovery_mode" in API docs.
required: false
type: string
type: str
choices:
- expression
- recovery_expression
Expand All @@ -136,7 +137,7 @@
- OK event closes.
- Overrides "correlation_mode" in API docs.
required: false
type: string
type: str
choices: [ "all", "tag" ]
manual_close:
description:
Expand Down Expand Up @@ -382,7 +383,7 @@ def main():
template_name=dict(type='str', required=False),
params=dict(type='dict', required=False),
desc=dict(type='str', required=False, aliases=['description']),
dependencies=dict(type='list', required=False),
dependencies=dict(type='list', elements='dict', required=False),
state=dict(type='str', default="present", choices=['present', 'absent']),
))
module = AnsibleModule(
Expand Down
9 changes: 5 additions & 4 deletions plugins/modules/zabbix_triggerprototype.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
- Create triggerprototypes if they do not exist.
- Delete existing triggerprototypes if they exist.
author:
- "Andrew Lathrop"
- "Andrew Lathrop (@aplathrop)"
requirements:
- "python >= 2.6"
Expand Down Expand Up @@ -60,6 +60,7 @@
- list of trigger prototypes that this trigger prototype is dependent on
required: false
type: list
elements: dict
suboptions:
name:
description:
Expand Down Expand Up @@ -127,7 +128,7 @@
- OK event generation mode.
- Overrides "recovery_mode" in API docs.
required: false
type: string
type: str
choices:
- expression
- recovery_expression
Expand All @@ -137,7 +138,7 @@
- OK event closes.
- Overrides "correlation_mode" in API docs.
required: false
type: string
type: str
choices: [ "all", "tag" ]
manual_close:
description:
Expand Down Expand Up @@ -386,7 +387,7 @@ def main():
template_name=dict(type='str', required=False),
params=dict(type='dict', required=False),
desc=dict(type='str', required=False, aliases=['description']),
dependencies=dict(type='list', required=False),
dependencies=dict(type='list', elements='dict', required=False),
state=dict(type='str', default="present", choices=['present', 'absent']),
))
module = AnsibleModule(
Expand Down

0 comments on commit 30f4bde

Please sign in to comment.