Sysvinit - Enabling a service should use "defaults" if no runlevels are specified

This commit is contained in:
nervo 2018-11-16 15:29:08 +01:00 committed by Toshio Kuratomi
parent a96efa43f0
commit 1cba0a753a
2 changed files with 3 additions and 1 deletions
changelogs/fragments
lib/ansible/modules/system

View file

@ -0,0 +1,2 @@
bugfixes:
- sysvinit - enabling a service should use "defaults" if no runlevels are specified

View file

@ -267,7 +267,7 @@ def main():
# Perform enable/disable here
if enabled:
if location.get('update-rc.d'):
(rc, out, err) = module.run_command("%s %s enable" % (location['update-rc.d'], name))
(rc, out, err) = module.run_command("%s %s defaults" % (location['update-rc.d'], name))
elif location.get('chkconfig'):
(rc, out, err) = module.run_command("%s %s on" % (location['chkconfig'], name))
else: