mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-27 15:11:23 -07:00
renamed systemd detection function
This commit is contained in:
parent
733d017ad0
commit
c8f0cdbdfd
1 changed files with 2 additions and 2 deletions
|
@ -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'):
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue