mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 21:00:22 -07:00
Remove wildcard, add boilerplate and get rid of get_exception
* smaller collections of database modules * Some of the smaller collections of network modules
This commit is contained in:
parent
0c7602fb59
commit
0b9a78f0b3
110 changed files with 1094 additions and 2224 deletions
|
@ -2,25 +2,12 @@
|
|||
#coding: utf-8 -*-
|
||||
|
||||
# (c) 2013, David Stygstra <david.stygstra@gmail.com>
|
||||
#
|
||||
# Portions copyright @ 2015 VMware, Inc.
|
||||
#
|
||||
# This file is part of Ansible
|
||||
#
|
||||
# This module is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This software is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this software. If not, see <http://www.gnu.org/licenses/>.
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
# pylint: disable=C0111
|
||||
|
||||
ANSIBLE_METADATA = {'metadata_version': '1.0',
|
||||
'status': ['preview'],
|
||||
|
@ -114,7 +101,7 @@ EXAMPLES = '''
|
|||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.six import iteritems
|
||||
from ansible.module_utils.pycompat24 import get_exception
|
||||
|
||||
|
||||
def _fail_mode_to_str(text):
|
||||
if not text:
|
||||
|
@ -246,10 +233,10 @@ def map_params_to_obj(module):
|
|||
|
||||
return obj
|
||||
|
||||
# pylint: disable=E0602
|
||||
|
||||
def main():
|
||||
""" Entry point. """
|
||||
argument_spec={
|
||||
argument_spec = {
|
||||
'bridge': {'required': True},
|
||||
'parent': {'default': None},
|
||||
'vlan': {'default': None, 'type': 'int'},
|
||||
|
|
|
@ -1,27 +1,14 @@
|
|||
#!/usr/bin/python
|
||||
# coding: utf-8 -*-
|
||||
|
||||
# pylint: disable=C0111
|
||||
|
||||
#
|
||||
# (c) 2015, Mark Hamilton <mhamilton@vmware.com>
|
||||
#
|
||||
# Portions copyright @ 2015 VMware, Inc.
|
||||
#
|
||||
# This file is part of Ansible
|
||||
#
|
||||
# This module is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This software is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this software. If not, see <http://www.gnu.org/licenses/>.
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
|
||||
ANSIBLE_METADATA = {'metadata_version': '1.0',
|
||||
'status': ['preview'],
|
||||
|
@ -101,6 +88,9 @@ EXAMPLES = '''
|
|||
col: other_config
|
||||
key: disable-in-band
|
||||
'''
|
||||
import re
|
||||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
|
||||
|
||||
def map_obj_to_commands(want, have, module):
|
||||
|
@ -166,7 +156,6 @@ def map_params_to_obj(module):
|
|||
return obj
|
||||
|
||||
|
||||
# pylint: disable=E0602
|
||||
def main():
|
||||
""" Entry point for ansible module. """
|
||||
argument_spec = {
|
||||
|
@ -202,13 +191,5 @@ def main():
|
|||
module.exit_json(**result)
|
||||
|
||||
|
||||
# pylint: disable=W0614
|
||||
# pylint: disable=W0401
|
||||
# pylint: disable=W0622
|
||||
|
||||
# import module snippets
|
||||
from ansible.module_utils.basic import *
|
||||
import re
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
|
|
|
@ -1,26 +1,13 @@
|
|||
#!/usr/bin/python
|
||||
#coding: utf-8 -*-
|
||||
|
||||
# pylint: disable=C0111
|
||||
|
||||
# (c) 2013, David Stygstra <david.stygstra@gmail.com>
|
||||
#
|
||||
# Portions copyright @ 2015 VMware, Inc.
|
||||
#
|
||||
# This file is part of Ansible
|
||||
#
|
||||
# This module is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This software is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this software. If not, see <http://www.gnu.org/licenses/>.
|
||||
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
||||
|
||||
from __future__ import absolute_import, division, print_function
|
||||
__metaclass__ = type
|
||||
|
||||
|
||||
ANSIBLE_METADATA = {'metadata_version': '1.0',
|
||||
'status': ['preview'],
|
||||
|
@ -114,7 +101,7 @@ EXAMPLES = '''
|
|||
|
||||
from ansible.module_utils.basic import AnsibleModule
|
||||
from ansible.module_utils.six import iteritems
|
||||
from ansible.module_utils.pycompat24 import get_exception
|
||||
|
||||
|
||||
def _external_ids_to_dict(text):
|
||||
text = text.strip()
|
||||
|
@ -239,7 +226,6 @@ def map_params_to_obj(module):
|
|||
|
||||
return obj
|
||||
|
||||
# pylint: disable=E0602
|
||||
def main():
|
||||
""" Entry point. """
|
||||
argument_spec={
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue