Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Brand new install can't find eyaml command #220

Open
iainhallam opened this issue Apr 19, 2018 · 2 comments
Open

Brand new install can't find eyaml command #220

iainhallam opened this issue Apr 19, 2018 · 2 comments

Comments

@iainhallam
Copy link

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 5.5.1
  • Puppet server version: 5.3.1
  • Ruby: ? 2.4.0
  • Distribution: CentOS 7.4
  • Module version: 3.3.2

How to reproduce (e.g Puppet code you use)

(Having already installed Puppet and Foreman using theforeman-puppet and theforeman-foreman/theforeman-foreman_proxy.)

puppet module install --version 1.6.0 puppetlabs-inifile
puppet module install --version 3.3.2 puppet-hiera
puppet module install --version 1.0.0 puppetlabs-puppetserver_gem
puppet apply hiera.pp
class { '::hiera':
  # EYAML
  create_keys     => true,
  eyaml           => true,

  # Global hierarchy
  hiera_version   => '5',
  hiera5_defaults => {
    'datadir'   => 'data',
    'data_hash' => 'yaml_data',
  },
  hierarchy       => [
    {
      'name' => 'Global default YAML',
      'path' => 'default.yaml',
    },
  ],
  merge_behavior  => 'deeper',
  provider        => 'puppetserver_gem',
}

What are you seeing

Puppet fails to create the keys because it can't find the eyaml command. Is this due to using puppet apply?

What behaviour did you expect instead

Puppet would be able to use eyaml without extra steps, or anything extra would be documented in the README.

Output log

Notice: Compiled catalog for puppet-server.private in environment production in 0.19 seconds
Notice: /Stage[main]/Hiera::Eyaml/File[/etc/puppetlabs/puppet/keys]/ensure: created
Notice: /Stage[main]/Hiera::Deep_merge/Hiera::Install[deep_merge]/Package[puppetserver deep_merge]/ensure: created
Notice: /Stage[main]/Hiera::Eyaml/File[/etc/puppetlabs/puppet/keys/private_key.pkcs7.pem]: Dependency Exec[createkeys] has failures: true
Notice: /Stage[main]/Hiera::Eyaml/File[/etc/puppetlabs/puppet/keys/public_key.pkcs7.pem]: Dependency Exec[createkeys] has failures: true
Notice: /Stage[main]/Hiera/File[/etc/puppetlabs/puppet/hiera.yaml]: Dependency Exec[createkeys] has failures: true
Notice: /Stage[main]/Hiera/File[/etc/hiera.yaml]: Dependency Exec[createkeys] has failures: true
Notice: /Stage[main]/Hiera/Ini_setting[puppet.conf hiera_config main section]: Dependency Exec[createkeys] has failures: true
Error: Could not find command 'eyaml'
Error: /Stage[main]/Hiera::Eyaml/Exec[createkeys]/returns: change from 'notrun' to ['0'] failed: Could not find command 'eyaml'
Warning: /Stage[main]/Hiera::Eyaml/File[/etc/puppetlabs/puppet/keys/private_key.pkcs7.pem]: Skipping because of failed dependencies
Warning: /Stage[main]/Hiera::Eyaml/File[/etc/puppetlabs/puppet/keys/public_key.pkcs7.pem]: Skipping because of failed dependencies
Warning: /Stage[main]/Hiera/File[/etc/puppetlabs/puppet/hiera.yaml]: Skipping because of failed dependencies
Warning: /Stage[main]/Hiera/File[/etc/hiera.yaml]: Skipping because of failed dependencies
Warning: /Stage[main]/Hiera/Ini_setting[puppet.conf hiera_config main section]: Skipping because of failed dependencies
Notice: Applied catalog in 83.40 seconds

Any additional information you'd like to impart

@iainhallam iainhallam changed the title Brand new install can't fine eyaml command Brand new install can't find eyaml command Apr 19, 2018
@jhelwig
Copy link

jhelwig commented May 18, 2018

Looks like the problem is that /opt/puppetlabs/puppet/lib/ruby/vendor_gems/bin/ (where the gem ends up putting the eyaml binary) isn't in the PATH. I got around this locally by symlinking the eyaml binary into /opt/puppetlabs/puppet/bin/.

@Jvekka
Copy link

Jvekka commented Sep 27, 2018

Also install hiera-eyaml is crucial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants