Ejemplo n.º 1
0
 def __init__(self, module):
     self.module       = module
     self.name         = module.params['name']
     if self.platform == 'Linux' and ServiceMgrFactCollector.is_systemd_managed(module):
         self.strategy = SystemdStrategy(module)
     else:
         self.strategy = self.strategy_class(module)
Ejemplo n.º 2
0
 def __init__(self, module):
     self.module = module
     self.name = module.params['name']
     if self.platform == 'Linux' and ServiceMgrFactCollector.is_systemd_managed(module):
         self.strategy = SystemdStrategy(module)
     else:
         self.strategy = self.strategy_class(module)
Ejemplo n.º 3
0
    def __init__(self, module):
        self.module = module
        self.name = module.params['name']
        self.use = module.params['use']

        if self.use is not None:
            strat = globals()['%sStrategy' % STRATS[self.use]]
            self.strategy = strat(module)
        elif self.platform == 'Linux' and ServiceMgrFactCollector.is_systemd_managed(module):
            self.strategy = SystemdStrategy(module)
        else:
            self.strategy = self.strategy_class(module)