Exemplo n.º 1
0
 public function execute(InputInterface $input, OutputInterface $output)
 {
     $key = $input->getArgument('key');
     $output->write("Hiera-PHP: looking up key `{$key}`\n");
     $scope = new Scope();
     $scope->setVariable('::environment', 'production');
     $scope->setVariable('::clientcert', 'web01.dc1.example.webx');
     $scope->setVariable('::country', 'nl');
     $hiera = new Hiera();
     $loader = new YamlConfigLoader();
     $loader->load($hiera, __DIR__ . '/../../examples/hiera.yaml');
     $answer = $hiera->lookup($key, '#default#', $scope);
     $output->write("Answer: `{$answer}`\n");
 }