Skip to content

Commit 1fbeb78

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 8707f75 commit 1fbeb78

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

lib/kafo/execution_environment.rb

Lines changed: 5 additions & 0 deletions
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
@@ -48,6 +52,7 @@ def configure_puppet(settings = {})
4852
'hiera_config' => hiera_config,
4953
'reports' => 'store',
5054
'reportdir' => reportdir,
55+
'libdir' => libdir,
5156
}.merge(settings)
5257

5358
PuppetConfigurer.new(puppet_conf, settings)

0 commit comments

Comments
 (0)