mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-10 18:34:03 -07:00
Fix modules' use of BOOLEANS*
* The canonical location of BOOLEANS has moved. Switch imports to use that. * clean up argument_spec use of booleans. * Clean up imports to not use wildcards * Remove usage of get_exception
This commit is contained in:
parent
ff22528b07
commit
d64e291274
17 changed files with 98 additions and 102 deletions
|
@ -118,6 +118,10 @@ try:
|
|||
except ImportError:
|
||||
HAS_F5SDK = False
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.ec2 import camel_dict_to_snake_dict
|
||||
from ansible.module_utils.f5_utils import F5ModuleError, f5_argument_spec
|
||||
|
||||
|
||||
class BigIpGtmDatacenter(object):
|
||||
def __init__(self, *args, **kwargs):
|
||||
|
@ -346,7 +350,7 @@ def main():
|
|||
meta_args = dict(
|
||||
contact=dict(required=False, default=None),
|
||||
description=dict(required=False, default=None),
|
||||
enabled=dict(required=False, type='bool', default=None, choices=BOOLEANS),
|
||||
enabled=dict(required=False, type='bool', default=None),
|
||||
location=dict(required=False, default=None),
|
||||
name=dict(required=True)
|
||||
)
|
||||
|
@ -365,9 +369,6 @@ def main():
|
|||
except F5ModuleError as e:
|
||||
module.fail_json(msg=str(e))
|
||||
|
||||
from ansible.module_utils.basic import *
|
||||
from ansible.module_utils.ec2 import camel_dict_to_snake_dict
|
||||
from ansible.module_utils.f5_utils import *
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue