Skip to content

Commit 7763a2e

Browse files
committed
force libdir to be part of our execution environment
When the kafo is executed on a system that itself is a client to a Puppet server, plugins that got synced (using pluginsync) from said server into /opt/puppetlabs/puppet/cache/lib/ are picked up instead of the ones in the configured modules dir under certain circumstances. For example, puppetlabs-postgresql changed the postgresql_conf provider from "parsed" to "ruby" in 10.0. If the parsed provider is present in /opt/puppetlabs/puppet/cache/lib/ it gets used, instead of the new ruby one, but the calling code (being from puppetlabs-postgresql 10+) doesn't expect that and fails to properly (yet silently!) configure PostgreSQL.
1 parent f4f2497 commit 7763a2e

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

lib/kafo/execution_environment.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ def directory
1919
end
2020
end
2121

22+
def libdir
23+
@libdir ||= File.join(directory, 'lib')
24+
end
25+
2226
def reportdir
2327
@reportdir ||= File.join(directory, 'reports')
2428
end
@@ -46,8 +50,9 @@ def configure_puppet(settings = {})
4650
'environmentpath' => environmentpath,
4751
'factpath' => factpath,
4852
'hiera_config' => hiera_config,
49-
'reports' => 'store',
53+
'libdir' => libdir,
5054
'reportdir' => reportdir,
55+
'reports' => 'store',
5156
}.merge(settings)
5257

5358
PuppetConfigurer.new(puppet_conf, settings)

0 commit comments

Comments
 (0)