def __init__(self, inventory): """ constructor """ logger.debug("Running plugin: %s with cluster config %s" % (__file__, os.environ['OPS_CLUSTER_CONFIG'])) app = AppContainer([os.environ['OPS_CLUSTER_CONFIG'], 'noop']) self.config = app.cluster_config.all()
def __init__(self, *args): """ constructor """ super(VarsModule, self).__init__(*args) logger.debug("Running plugin: %s with cluster config %s" % (__file__, os.environ['OPS_CLUSTER_CONFIG'])) app = AppContainer([os.environ['OPS_CLUSTER_CONFIG'], 'noop']) self.config = app.cluster_config.all()
def app(*args): app = AppContainer(args) def test_plugin(inventory_opts): return """ { "bastion": ["bastion.host"], "nat": ["bastion.host"], "web": [ "web1.host", "web2.host" ] } """ # we configure the plugin test_plugin inventory_plugins = ListInstanceProvider(instance(test_plugin)) app.inventory_plugins = inventory_plugins return app
def __init__(self, inventory): """ constructor """ logger.debug("Running plugin: %s with cluster config %s" % (__file__, os.environ['OPS_CLUSTER_CONFIG'])) app = AppContainer([os.environ['OPS_CLUSTER_CONFIG'], 'noop']) self.config = app.ops_config.config.copy() self.config.update({ 'ops_package_dir': app.ops_config.package_dir, 'ops_ansible_tasks_dir': app.ops_config.package_dir + "/data/ansible/tasks" })
def app(args): return AppContainer(args)