example42 / puppet-tp

Tiny Puppet - The Universal Installer
http://tiny-puppet.com
Apache License 2.0
68 stars 21 forks source link

module path does not exist #37

Closed logicminds closed 7 years ago

logicminds commented 7 years ago

Expected Behavior

tp list would return a list of packages

Actual Behavior

root@73f7186c66f8:/# tp list
/usr/local/bin/tp:106:in `open': No such file or directory @ dir_initialize - /etc/puppetlabs/code/environments/production/modules/tinydata/data (Errno::ENOENT)
    from /usr/local/bin/tp:106:in `entries'
    from /usr/local/bin/tp:106:in `<main>'

Steps to Reproduce the Problem

  1. docker run -ti ruby:2.3.1 bash
  2. gem install puppet
  3. mkdir -p /opt/puppetlabs/bin
  4. ln -nfs /usr/local/bin/ruby /opt/puppetlabs/bin/ruby
  5. puppet module install example42-tp
  6. puppet tp setup
  7. tp list

The problem

Tp sets the data source to /etc/puppetlabs/code/environments/production/modules However, puppet is using /etc/puppetlabs/code/modules by default.

I suspect this is because when the module was installed there was no configured environmentpath in the settings.

I think TP should be looking in basemodulepath and environment path

alvagante commented 7 years ago

Just for clarity, step 5 for "puppet tp install" right?

logicminds commented 7 years ago

updated original instructions.

alvagante commented 7 years ago

Version 1.4.2 (also on the forge) fixes this, even if it's not an optimal solution (but I slightly prefer this that to run Puppet each time tp list is run just to get the correct paths from config)