mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-26 12:21:26 -07:00
Sanity fixes to parameter types (#52325)
This commit is contained in:
parent
47190088b4
commit
677c04c01d
25 changed files with 445 additions and 404 deletions
|
@ -1,20 +1,18 @@
|
|||
#!/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
# (c) 2012, Mark Theunissen <mark.theunissen@gmail.com>
|
||||
# Copyright: (c) 2012, Mark Theunissen <mark.theunissen@gmail.com>
|
||||
# Sponsored by Four Kitchens http://fourkitchens.com.
|
||||
# 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.1',
|
||||
'status': ['preview'],
|
||||
'supported_by': 'community'}
|
||||
|
||||
|
||||
DOCUMENTATION = '''
|
||||
DOCUMENTATION = r'''
|
||||
---
|
||||
module: mysql_db
|
||||
short_description: Add or remove MySQL databases from a remote host.
|
||||
|
@ -72,7 +70,7 @@ notes:
|
|||
extends_documentation_fragment: mysql
|
||||
'''
|
||||
|
||||
EXAMPLES = '''
|
||||
EXAMPLES = r'''
|
||||
- name: Create a new database with name 'bobdata'
|
||||
mysql_db:
|
||||
name: bobdata
|
||||
|
@ -250,26 +248,26 @@ def db_create(cursor, db, encoding, collation):
|
|||
def main():
|
||||
module = AnsibleModule(
|
||||
argument_spec=dict(
|
||||
login_user=dict(default=None),
|
||||
login_password=dict(default=None, no_log=True),
|
||||
login_host=dict(default="localhost"),
|
||||
login_port=dict(default=3306, type='int'),
|
||||
login_unix_socket=dict(default=None),
|
||||
name=dict(required=True, aliases=['db']),
|
||||
encoding=dict(default=""),
|
||||
collation=dict(default=""),
|
||||
target=dict(default=None, type='path'),
|
||||
state=dict(default="present", choices=["absent", "present", "dump", "import"]),
|
||||
ssl_cert=dict(default=None, type='path'),
|
||||
ssl_key=dict(default=None, type='path'),
|
||||
ssl_ca=dict(default=None, type='path'),
|
||||
connect_timeout=dict(default=30, type='int'),
|
||||
config_file=dict(default="~/.my.cnf", type='path'),
|
||||
single_transaction=dict(default=False, type='bool'),
|
||||
quick=dict(default=True, type='bool'),
|
||||
ignore_tables=dict(default=[], type='list')
|
||||
login_user=dict(type='str'),
|
||||
login_password=dict(type='str', no_log=True),
|
||||
login_host=dict(type='str', default='localhost'),
|
||||
login_port=dict(type='int', default=3306),
|
||||
login_unix_socket=dict(type='str'),
|
||||
name=dict(type='str', required=True, aliases=['db']),
|
||||
encoding=dict(type='str', default=''),
|
||||
collation=dict(type='str', default=''),
|
||||
target=dict(type='path'),
|
||||
state=dict(type='str', default='present', choices=['absent', 'dump', 'import', 'present']),
|
||||
ssl_cert=dict(type='path'),
|
||||
ssl_key=dict(type='path'),
|
||||
ssl_ca=dict(type='path'),
|
||||
connect_timeout=dict(type='int', default=30),
|
||||
config_file=dict(type='path', default='~/.my.cnf'),
|
||||
single_transaction=dict(type='bool', default=False),
|
||||
quick=dict(type='bool', default=True),
|
||||
ignore_tables=dict(type='list', default=[]),
|
||||
),
|
||||
supports_check_mode=True
|
||||
supports_check_mode=True,
|
||||
)
|
||||
|
||||
if mysql_driver is None:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue