Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
8666f8ea
Commit
8666f8ea
authored
Oct 17, 2013
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4568 from mmoya/features
Improve change detection in mysql_variables
parents
4f674ec5
b90a2501
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
library/database/mysql_variables
+4
-2
No files found.
library/database/mysql_variables
View file @
8666f8ea
...
@@ -197,10 +197,12 @@ def main():
...
@@ -197,10 +197,12 @@ def main():
module
.
fail_json
(
msg
=
"unable to connect to database, check login_user and login_password are correct or ~/.my.cnf has the credentials"
)
module
.
fail_json
(
msg
=
"unable to connect to database, check login_user and login_password are correct or ~/.my.cnf has the credentials"
)
if
mysqlvar
is
None
:
if
mysqlvar
is
None
:
module
.
fail_json
(
msg
=
"Cannot run without variable to operate with"
)
module
.
fail_json
(
msg
=
"Cannot run without variable to operate with"
)
if
value
is
None
and
mysqlvar
is
not
None
:
mysqlvar_val
=
getvariable
(
cursor
,
mysqlvar
)
mysqlvar_val
=
getvariable
(
cursor
,
mysqlvar
)
if
value
is
None
:
module
.
exit_json
(
msg
=
mysqlvar_val
)
module
.
exit_json
(
msg
=
mysqlvar_val
)
else
:
else
:
if
value
==
mysqlvar_val
[
0
][
1
]:
module
.
exit_json
(
msg
=
"Variable already set to requested value"
,
changed
=
False
)
result
=
setvariable
(
cursor
,
mysqlvar
,
value
)
result
=
setvariable
(
cursor
,
mysqlvar
,
value
)
if
result
is
True
:
if
result
is
True
:
module
.
exit_json
(
msg
=
"Variable change succeeded"
,
changed
=
True
)
module
.
exit_json
(
msg
=
"Variable change succeeded"
,
changed
=
True
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment