mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +00:00
renamed systemd detection function
This commit is contained in:
@@ -379,7 +379,7 @@ class Facts(object):
|
|||||||
#FIXME: smf?
|
#FIXME: smf?
|
||||||
self.facts['service_mgr'] = 'svcs'
|
self.facts['service_mgr'] = 'svcs'
|
||||||
elif self.facts['system'] == 'Linux':
|
elif self.facts['system'] == 'Linux':
|
||||||
if self._check_systemd():
|
if self.is_systemd_managed():
|
||||||
self.facts['service_mgr'] = 'systemd'
|
self.facts['service_mgr'] = 'systemd'
|
||||||
elif self.module.get_bin_path('initctl') and os.path.exists("/etc/init/"):
|
elif self.module.get_bin_path('initctl') and os.path.exists("/etc/init/"):
|
||||||
self.facts['service_mgr'] = 'upstart'
|
self.facts['service_mgr'] = 'upstart'
|
||||||
@@ -515,7 +515,7 @@ class Facts(object):
|
|||||||
self.facts['date_time']['tz'] = time.strftime("%Z")
|
self.facts['date_time']['tz'] = time.strftime("%Z")
|
||||||
self.facts['date_time']['tz_offset'] = time.strftime("%z")
|
self.facts['date_time']['tz_offset'] = time.strftime("%z")
|
||||||
|
|
||||||
def _check_systemd(self):
|
def is_systemd_managed(self):
|
||||||
# tools must be installed
|
# tools must be installed
|
||||||
if self.module.get_bin_path('systemctl'):
|
if self.module.get_bin_path('systemctl'):
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user