voxpupuli / puppet-hiera

Hiera hierarchy module for templating `hiera.yaml`
https://forge.puppet.com/puppet/hiera
Apache License 2.0
32 stars 104 forks source link

eyaml gem not installed in PE 2017.2.2 #201

Open jvelasquez opened 6 years ago

jvelasquez commented 6 years ago

Affected Puppet, Ruby, OS and module versions/distributions

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

  class { 'hiera':
    hierarchy       => [
      'virtual/%{::virtual}',
      'nodes/%{::trusted.certname}',
      'common',
    ],
    hiera_yaml      => $hiera_yaml,
    datadir         => '/etc/puppetlabs/code/environments/%{environment}/hieradata',
    owner           => 'pe-puppet',
    group           => 'pe-puppet',
    notify          => Service['pe-puppetserver'],

    ## Configure eyaml
    eyaml           => true,
    # create_keys     => true,
    eyaml_extension => 'yaml',
  }

Puppetfile

forge "http://forge.puppetlabs.com"

mod "puppetlabs/inifile",     '1.6.0'
mod "puppetlabs/stdlib",      '4.17.1'
mod "puppetlabs/concat",      '2.2.1'
mod "puppet/hiera",           '3.0.0'
mod "npwalker/pe_code_manager_webhook",  '2.0.1'
mod "npwalker/pe_metric_curl_cron_jobs", '4.0.0'

mod 'gms',
  :git    => 'https://github.com/abrader/abrader-gms',
  :ref    => 'a5105e95cf0f8b84a143d7a69a83e3ff3d4e02fb'

#mod 'pltraining-rbac',
#  :git    => 'https://github.com/puppetlabs/pltraining-rbac',
#  :ref    => '9a823ff42810988f80a2b65738054a816620d972'

mod 'custom_profile_puppetmaster',
  :git    => 'git',
  :tag    => 'v1.0-beta.1'

What are you seeing

Error saying that I am missing the eyaml gem

What behaviour did you expect instead

The hiera module to install the eyam puppetgem

Output log

[root@ip-172-31-36-6 code]# puppet agent -t
Info: Using configured environment 'production'
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Info: Caching catalog for ip-172-31-36-6.eu-west-1.compute.internal
Info: Applying configuration version 'ddb1532057657673bb77a8f7a02af48de89bd5ee'
Notice: /Stage[main]/Puppet_enterprise::Master/Pe_ini_setting[puppetconf environment_timeout setting]/value: value changed 'unlimited' to '0'
Info: /Stage[main]/Puppet_enterprise::Master/Pe_ini_setting[puppetconf environment_timeout setting]: Scheduling refresh of Service[pe-puppetserver]
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'
Notice: /Stage[main]/Hiera::Eyaml/File[/etc/puppetlabs/puppet/keys/private_key.pkcs7.pem]: Dependency Exec[createkeys] has failures: true
Warning: /Stage[main]/Hiera::Eyaml/File[/etc/puppetlabs/puppet/keys/private_key.pkcs7.pem]: Skipping because of failed dependencies
Notice: /Stage[main]/Hiera::Eyaml/File[/etc/puppetlabs/puppet/keys/public_key.pkcs7.pem]: Dependency Exec[createkeys] has failures: true
Warning: /Stage[main]/Hiera::Eyaml/File[/etc/puppetlabs/puppet/keys/public_key.pkcs7.pem]: Skipping because of failed dependencies
Notice: /Stage[main]/Hiera/File[/etc/puppetlabs/puppet/hiera.yaml]: Dependency Exec[createkeys] has failures: true
Warning: /Stage[main]/Hiera/File[/etc/puppetlabs/puppet/hiera.yaml]: Skipping because of failed dependencies
Notice: /Stage[main]/Hiera/File[/etc/hiera.yaml]: Dependency Exec[createkeys] has failures: true
Warning: /Stage[main]/Hiera/File[/etc/hiera.yaml]: Skipping because of failed dependencies
Notice: /Stage[main]/Hiera/Ini_setting[puppet.conf hiera_config main section]: Dependency Exec[createkeys] has failures: true
Warning: /Stage[main]/Hiera/Ini_setting[puppet.conf hiera_config main section]: Skipping because of failed dependencies
Notice: /Stage[main]/Custom_profile_puppetmaster/Ini_setting[environment_timeout = unlimited]/value: value changed '0' to 'unlimited'
Info: /Stage[main]/Custom_profile_puppetmaster/Ini_setting[environment_timeout = unlimited]: Scheduling refresh of Service[pe-puppetserver]
Notice: Please Enable Code Manager via hiera with this parameter `puppet_enterprise::profile::master::code_manager_auto_configure`.  If you enabled code manager via the PE Console you may set $force_code_manager_webhook to true.
Notice: /Stage[main]/Pe_code_manager_webhook/Notify[Please Enable Code Manager via hiera with this parameter `puppet_enterprise::profile::master::code_manager_auto_configure`.  If you enabled code manager via the PE Console you may set $force_code_manager_webhook to true.]/message: defined 'message' as 'Please Enable Code Manager via hiera with this parameter `puppet_enterprise::profile::master::code_manager_auto_configure`.  If you enabled code manager via the PE Console you may set $force_code_manager_webhook to true.'
Notice: /Stage[main]/Puppet_enterprise::Master::Puppetserver/Puppet_enterprise::Trapperkeeper::Pe_service[puppetserver]/Service[pe-puppetserver]: Dependency Exec[createkeys] has failures: true
Warning: /Stage[main]/Puppet_enterprise::Master::Puppetserver/Puppet_enterprise::Trapperkeeper::Pe_service[puppetserver]/Service[pe-puppetserver]: Skipping because of failed dependencies
Info: /Stage[main]/Puppet_enterprise::Master::Puppetserver/Puppet_enterprise::Trapperkeeper::Pe_service[puppetserver]/Service[pe-puppetserver]: Unscheduling all events on Service[pe-puppetserver]
Info: Stage[main]: Unscheduling all events on Stage[main]
Notice: Applied catalog in 9.91 seconds

Any additional information you'd like to impart

n/a

dwtien commented 6 years ago

I ran to the same issue on PE2017.2.1. I tried rolling back to a snapshot of PE2016.4.3 but still experienced the same problem. I came across the following solution:

https://github.com/voxpupuli/hiera-eyaml/issues/177

Basically, you have to run the gem install twice:

/opt/puppetlabs/puppet/bin/gem install hiera-eyaml /opt/puppetlabs/bin/puppetserver gem install hiera-eyaml

Following that, a puppet run was successful and keys were created.