@ -105,22 +105,22 @@ class ServiceMgrFactCollector(BaseFactCollector):
# FIXME: replace with a system->service_mgr_name map?
# start with the easy ones
elif collected_facts . get ( ' distribution' , None ) == ' MacOSX ' :
elif collected_facts . get ( ' ansible_ distribution' , None ) == ' MacOSX ' :
# FIXME: find way to query executable, version matching is not ideal
if LooseVersion ( platform . mac_ver ( ) [ 0 ] ) > = LooseVersion ( ' 10.4 ' ) :
service_mgr_name = ' launchd '
else :
service_mgr_name = ' systemstarter '
elif ' BSD ' in collected_facts . get ( ' system' , ' ' ) or collected_facts . get ( ' system' ) in [ ' Bitrig ' , ' DragonFly ' ] :
elif ' BSD ' in collected_facts . get ( ' ansible_ system' , ' ' ) or collected_facts . get ( ' ansible_ system' ) in [ ' Bitrig ' , ' DragonFly ' ] :
# FIXME: we might want to break out to individual BSDs or 'rc'
service_mgr_name = ' bsdinit '
elif collected_facts . get ( ' system' ) == ' AIX ' :
elif collected_facts . get ( ' ansible_ system' ) == ' AIX ' :
service_mgr_name = ' src '
elif collected_facts . get ( ' system' ) == ' SunOS ' :
elif collected_facts . get ( ' ansible_ system' ) == ' SunOS ' :
service_mgr_name = ' smf '
elif collected_facts . get ( ' distribution' ) == ' OpenWrt ' :
elif collected_facts . get ( ' ansible_ distribution' ) == ' OpenWrt ' :
service_mgr_name = ' openwrt_init '
elif collected_facts . get ( ' system' ) == ' Linux ' :
elif collected_facts . get ( ' ansible_ system' ) == ' Linux ' :
# FIXME: mv is_systemd_managed
if self . is_systemd_managed ( module = module ) :
service_mgr_name = ' systemd '