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
03c0b8dc
Commit
03c0b8dc
authored
Mar 08, 2013
by
Nikolay Panov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed 'service'. Now it respect 'enabled=no' as well.
parent
76f3351b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
library/service
+2
-2
No files found.
library/service
View file @
03c0b8dc
...
@@ -743,7 +743,7 @@ def main():
...
@@ -743,7 +743,7 @@ def main():
service
.
get_service_tools
()
service
.
get_service_tools
()
# Enable/disable service startup at boot if requested
# Enable/disable service startup at boot if requested
if
service
.
module
.
params
[
'enabled'
]:
if
service
.
module
.
params
[
'enabled'
]
is
not
None
:
# FIXME: ideally this should detect if we need to toggle the enablement state, though
# FIXME: ideally this should detect if we need to toggle the enablement state, though
# it's unlikely the changed handler would need to fire in this case so it's a minor thing.
# it's unlikely the changed handler would need to fire in this case so it's a minor thing.
service
.
service_enable
()
service
.
service_enable
()
...
@@ -766,7 +766,7 @@ def main():
...
@@ -766,7 +766,7 @@ def main():
module
.
fail_json
(
msg
=
out
)
module
.
fail_json
(
msg
=
out
)
result
[
'changed'
]
=
service
.
changed
result
[
'changed'
]
=
service
.
changed
if
service
.
module
.
params
[
'enabled'
]:
if
service
.
module
.
params
[
'enabled'
]
is
not
None
:
result
[
'enabled'
]
=
service
.
module
.
params
[
'enabled'
]
result
[
'enabled'
]
=
service
.
module
.
params
[
'enabled'
]
if
not
service
.
module
.
params
[
'state'
]:
if
not
service
.
module
.
params
[
'state'
]:
...
...
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