mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 20:01:25 -07:00
fix legacy PEP8 violations in zabbix modules, remove test exception for them (#31702)
* fix legacy PEP8 violations in zabbix_*, remove test exception for them * fix new pep8 violations for zabbix_maintenance.py
This commit is contained in:
parent
85bd104c7c
commit
1b71fb0499
6 changed files with 14 additions and 21 deletions
|
@ -151,7 +151,7 @@ class HostMacro(object):
|
|||
# update host macro
|
||||
def update_host_macro(self, host_macro_obj, macro_name, macro_value):
|
||||
host_macro_id = host_macro_obj['hostmacroid']
|
||||
if host_macro_obj['macro'] == '{$'+macro_name+'}' and host_macro_obj['value'] == macro_value:
|
||||
if host_macro_obj['macro'] == '{$' + macro_name + '}' and host_macro_obj['value'] == macro_value:
|
||||
self._module.exit_json(changed=False, result="Host macro %s already up to date" % macro_name)
|
||||
try:
|
||||
if self._module.check_mode:
|
||||
|
@ -172,6 +172,7 @@ class HostMacro(object):
|
|||
except Exception as e:
|
||||
self._module.fail_json(msg="Failed to delete host macro %s: %s" % (macro_name, e))
|
||||
|
||||
|
||||
def main():
|
||||
module = AnsibleModule(
|
||||
argument_spec=dict(
|
||||
|
@ -200,7 +201,7 @@ def main():
|
|||
http_login_password = module.params['http_login_password']
|
||||
validate_certs = module.params['validate_certs']
|
||||
host_name = module.params['host_name']
|
||||
macro_name = (module.params['macro_name']).upper()
|
||||
macro_name = (module.params['macro_name']).upper()
|
||||
macro_value = module.params['macro_value']
|
||||
state = module.params['state']
|
||||
timeout = module.params['timeout']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue