Mark path as type='path', do not leak login_password by error (#3396)
This commit is contained in:
parent
a2c2a67170
commit
738e62e449
1 changed files with 5 additions and 6 deletions
|
@ -474,7 +474,7 @@ def main():
|
||||||
module = AnsibleModule(
|
module = AnsibleModule(
|
||||||
argument_spec = dict(
|
argument_spec = dict(
|
||||||
login_user=dict(default=None),
|
login_user=dict(default=None),
|
||||||
login_password=dict(default=None),
|
login_password=dict(default=None, no_log=True),
|
||||||
login_host=dict(default="localhost"),
|
login_host=dict(default="localhost"),
|
||||||
login_port=dict(default=3306, type='int'),
|
login_port=dict(default=3306, type='int'),
|
||||||
login_unix_socket=dict(default=None),
|
login_unix_socket=dict(default=None),
|
||||||
|
@ -489,11 +489,11 @@ def main():
|
||||||
check_implicit_admin=dict(default=False, type='bool'),
|
check_implicit_admin=dict(default=False, type='bool'),
|
||||||
update_password=dict(default="always", choices=["always", "on_create"]),
|
update_password=dict(default="always", choices=["always", "on_create"]),
|
||||||
connect_timeout=dict(default=30, type='int'),
|
connect_timeout=dict(default=30, type='int'),
|
||||||
config_file=dict(default="~/.my.cnf"),
|
config_file=dict(default="~/.my.cnf", type='path'),
|
||||||
sql_log_bin=dict(default=True, type='bool'),
|
sql_log_bin=dict(default=True, type='bool'),
|
||||||
ssl_cert=dict(default=None),
|
ssl_cert=dict(default=None, type='path'),
|
||||||
ssl_key=dict(default=None),
|
ssl_key=dict(default=None, type='path'),
|
||||||
ssl_ca=dict(default=None),
|
ssl_ca=dict(default=None, type='path'),
|
||||||
),
|
),
|
||||||
supports_check_mode=True
|
supports_check_mode=True
|
||||||
)
|
)
|
||||||
|
@ -517,7 +517,6 @@ def main():
|
||||||
db = 'mysql'
|
db = 'mysql'
|
||||||
sql_log_bin = module.params["sql_log_bin"]
|
sql_log_bin = module.params["sql_log_bin"]
|
||||||
|
|
||||||
config_file = os.path.expanduser(os.path.expandvars(config_file))
|
|
||||||
if not mysqldb_found:
|
if not mysqldb_found:
|
||||||
module.fail_json(msg="the python mysqldb module is required")
|
module.fail_json(msg="the python mysqldb module is required")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue