Puppet can't find bundle command

I am using a puppet with Vagrant, but have a few problems around using rbenv to install Ruby installations.

Ruby sets a penalty (I use the plugin: https://forge.puppetlabs.com/jdowning/rbenv to install Ruby + gems as such:

rbenv::plugin { 'sstephenson/ruby-build': } -> rbenv::build { '1.9.3-p392': global => true } -> rbenv::gem { 'bundler': ruby_version => '1.9.3-p392' } -> 

However, after starting Puppet, it cannot find the bundler command in the rmenvs shim folder. I see that the rhenv rehash events and the analysis of the plugin manifest show that it should rename the binaries after starting and installing gem, etc.

If I am ssh for the machine, "which messenger" finds the path to the binary. Similarly, restarting the puppet script works correctly and installs everything perfectly.

I am currently using the following command:

 exec { "bundle install": user => $app_user, group => $app_group, command => "bundle install", path => [ '/bin/', '/sbin/', '/usr/bin/', '/usr/sbin/', "/home/${app_user}/.rbenv/bin/", "/home/${app_user}/.rbenv/shims/" ], cwd => $app_root, } -> 

The path is the excess that I know.

Any ideas on what I could try next? I have no ideas.

+4
source share
1 answer

It is important to ensure that all gem settings are complete before attempting to complete the bundler, for example.

 exec { "bundle install": require => Rbenv::Gem["..."], ... } 

Otherwise, it is possible that the rehash resource will be evaluated after your exec.

0
source

Source: https://habr.com/ru/post/1489835/


All Articles