Ask Your Question
0

Is there some other option I need to use with puppet module install? or is this just a glitch on my system?

asked 2017-11-22 17:21:56 -0600

Brian_Reid gravatar image

updated 2017-11-23 10:13:26 -0600

stivesso gravatar image

I am migrating to the most recent versions of puppet modules as I can get and I have come across a weird issue. As my normal account I can run a puppet module install 'modulename' and it will install/upgrade any module to my homedir/.puppetlabs/etc/code/modules dir. Where I can than cp or mv the dir to my actual /etc/puppetlabs/code/environments/dev/modules dir commit the change and push it to our git repo. However if I run the command as root the puppet module install fails with Error: undefined method `tr' for nil:NilClass. I can run,as root, puppet module install --version 6.0.0 --modulepath /tmp/elastic --ignore-dependencies elastic-elasticsearch which works fine but if I run puppet module install --version 6.0.0 --modulepath /etc/puppetlabs/code/environments/dev/modules -ignore-dependencies elastic-elasticsearch it fails with the error.

[0] root@puppet4-brian.office:~# puppet module install --version 6 --modulepath /etc/puppetlabs/code/environments/dev/modules/ --environment dev --debug --ignore-dependencies elastic-elasticsearch
Debug: Runtime environment: puppet_version=4.10.1, ruby_version=2.1.9, run_mode=user, default_encoding=UTF-8
Notice: Preparing to install into /etc/puppetlabs/code/environments/dev/modules ...
Error: undefined method 'tr' for nil:NilClass
Error: Try 'puppet help module install' for usage


 root@puppet4-brian.office:~# puppet module install --version 6.0.0 --modulepath /tmp/elastic --ignore-dependencies elastic-elasticsearch
Notice: Preparing to install into /tmp/elastic ...
Notice: Created target directory /tmp/elastic
Notice: Downloading from https://forgeapi.puppet.com ...
Notice: Installing -- do not interrupt ...
/tmp/elastic
└── elastic-elasticsearch (v6.0.0)


-bash-4.2$ puppet module install --version 6 --ignore-dependencies elastic-elasticsearch
Notice: Preparing to install into /nfshome/brianr/.puppetlabs/etc/code/modules ...
Notice: Downloading from https://forgeapi.puppet.com ...
Notice: Installing -- do not interrupt ...
/nfshome/brianr/.puppetlabs/etc/code/modules
└── elastic-elasticsearch (v6.0.0)
edit retag flag offensive close merge delete

Comments

Yeah, no, I guess this is a programming error. Something's been expected but not proven to be indeed true.

Kai Burghardt gravatar imageKai Burghardt ( 2017-12-11 12:51:00 -0600 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2017-11-25 23:02:43 -0600

rnelson0 gravatar image

Does it fail as root if you provide a different modulepath, maybe a temporary directory?

I would guess that the metadata.json of an existing module is incomplete and causing the PMT to fail. You can try puppet module list with your modulepath, as root, and see how that goes.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-11-22 17:21:56 -0600

Seen: 52 times

Last updated: Nov 25