Bug #8162
closedForman proxy not reading module path returned by puppet for environments
Description
I have the following in my puppet.conf
[master]
autosign = $confdir/autosign.conf { mode = 664 }
reports = foreman
external_nodes = /etc/puppet/node.rb
node_terminus = exec
ca = true
ssldir = /var/lib/puppet/ssl
certname = <MY_MACHINE_FQDN>
strict_variables = false
environmentpath = /etc/puppet/environments
basemodulepath = /etc/puppet/environments/$environment/modules/forge:/etc/puppet/environments/$environment/modules/local
When I curl the puppet foreman proxy I get environments reported
curl -k -sS https://<MY_MACHINE_FQDN>:8140/v2.0/environments --cert /var/lib/puppet/ssl/certs/<MY_MACHINE_FQDN>.pem --key /var/lib/puppet/ssl/private_keys/<MY_MACHINE_FQDN>.pem -X GET http://localhost:8443/puppet/environments
Returned data (formatted)
{"search_paths":["file:///etc/puppet/environments",
"data:text/plain,
internal"],
"environments":
{"dev":
{"settings":
{"manifest":"/etc/puppet/environments/dev/manifests",
"environment_timeout":180,
"config_version":"",
"modulepath":["/etc/puppet/environments/dev/modules",
"/etc/puppet/environments/$environment/modules/forge",
"/etc/puppet/environments/$environment/modules/local"]}},
"uat":
{"settings":
{"manifest":"/etc/puppet/environments/uat/manifests",
"environment_timeout":180,
"config_version":"",
"modulepath":["/etc/puppet/environments/uat/modules",
"/etc/puppet/environments/$environment/modules/forge",
"/etc/puppet/environments/$environment/modules/local"]}},
"live":
{"settings":
{"manifest":"/etc/puppet/environments/live/manifests",
"environmecurl: (56) Failure when receiving data from the peer
nt_timeout":180,
"config_version":"",
"modulepath":["/etc/puppet/environments/live/modules",
"/etc/puppet/environments/$environment/modules/forge",
"/etc/puppet/environments/$environment/modules/local"]}}}}
My understanding from this is that the proxy has correctly found the environments
I am running Forman 1.6.1-1
on CentOS release 6.5
It was installed with installer defaults
puppet version is 3.7.2 (community)
The Foreman web GUI does not find modules that are not on the path /etc/puppet/environments/<environment>/modules/ and seems to be ignoring the search paths returned by the API call
Updated by Dominic Cleal over 9 years ago
- Project changed from Foreman to Smart Proxy
- Category changed from Puppet integration to Puppet
Updated by The Foreman Bot over 9 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/smart-proxy/pull/238 added
- Pull request deleted (
)
Updated by Shlomi Zadok over 9 years ago
- Status changed from Ready For Testing to Rejected
Puppet does not allow to use $environment variable when using directory environments.
Please see the discussion at https://github.com/theforeman/smart-proxy/pull/238 (and puppet: https://github.com/puppetlabs/puppet/commit/e134843b44d6d2a9ba3d661f34e5c971b6600120) for why it is not supported.