Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Won't Fix
-
PUP 3.6.0
-
None
-
None
Description
If directory environments are configured, and you create an environment.conf in an environment, and you set the config_version parameter using a command that doesn't include the full path to the binary in question, such as:
config_version = 'git --git-dir $confdir/environments/$environment/.git rev-parse HEAD'
|
Puppet will attempt to look for the git binary in the relative environment path and produce the following error:
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Execution of config_version command `/etc/puppetlabs/puppet/environments/production/git --git-dir /etc/puppetlabs/puppet/environments/production/.git rev-parse HEAD` failed: Execution of '/etc/puppetlabs/puppet/environments/production/git --git-dir /etc/puppetlabs/puppet/environments/production/.git rev-parse HEAD' returned 1: on node master.puppetlabs.vm
|
I understand why relative pathing is important for modulepath, and I EVEN see why it's important if you wrap the command inside a script (so you can just drop the script inside the repository that's cloned to every environment), but using an inline command causes a problem. The benefit of using an inline command is that you can use $environment in the command (see above). If you use a script, you would need to pass the environment as an argument to the script to be able to use it (which is not too big of a problem).
I thought I'd raise the issue here for comment in case anyone else might have hit it.