mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-29 16:54:06 +02:00
parent
0f6fc7bfd0
commit
31c06d8156
@ -4,6 +4,7 @@ namespace Icinga\Module\Director\Cli;
|
||||
|
||||
use Icinga\Cli\Params;
|
||||
use Icinga\Exception\MissingParameterException;
|
||||
use Icinga\Module\Director\IcingaConfig\IcingaConfig;
|
||||
use Icinga\Module\Director\Objects\IcingaObject;
|
||||
use InvalidArgumentException;
|
||||
|
||||
@ -55,7 +56,12 @@ class ObjectCommand extends Command
|
||||
$data = $object->toPlainObject(false, $noDefaults);
|
||||
echo $this->renderJson($data, !$this->params->shift('no-pretty'));
|
||||
} else {
|
||||
echo $object;
|
||||
$config = new IcingaConfig($db);
|
||||
$object->renderToConfig($config);
|
||||
foreach ($config->getFiles() as $filename => $content) {
|
||||
printf("/** %s **/\n\n", $filename);
|
||||
echo $content;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user