Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Done
-
BKR 3.25.0
-
None
-
None
-
-
Needs Assessment
-
Needs Assessment
Description
When running beaker, there is a method called puppet_configprint which is aliased to puppet in lib/beaker/host.rb.
This is quite useful and used in multiple code locations as host.puppet['setting'].
Unfortunately, when using a Windows node, the puppet method is overwritten by a method from beaker-puppet/wrappers.rb.
Windows:
[1] pry(#<RSpec::ExampleGroups::WindowsNode>)> show-method host.puppetFrom: /home/user1/.rvm/gems/ruby-2.4.5/gems/beaker-puppet-1.18.7/lib/beaker-puppet/wrappers.rb @ line 42: |
Owner: Beaker::DSL::Wrappers
|
Visibility: public |
Number of lines: 9def puppet(*args)
|
options = args.last.is_a?(Hash) ? args.pop : {}
|
options['ENV'] ||= {} |
options[:cmdexe] = true |
# we assume that an invocation with `puppet()` will have it's first argument
|
# a face or sub command
|
cmd = "puppet #{args.shift}" |
Command.new( cmd, args, options ) |
end
|
[2] pry(#<RSpec::ExampleGroups::WindowsNode>)> fact_on(host, 'operatingsystem')win 18:00:55$ facter --json "operatingsystem" |
{
|
"operatingsystem": "windows" |
}win executed in 0.43 seconds |
=> "windows" |
Linux:
[1] pry(#<RSpec::ExampleGroups::WindowsNode>)> show-method host.puppetFrom: /home/user1/Work/beaker/lib/beaker/host.rb @ line 135: |
Owner: Beaker::Host
|
Visibility: public |
Number of lines: 3def puppet_configprint(command='agent') |
PuppetConfigReader.new(self, command) |
end
|
[2] pry(#<RSpec::ExampleGroups::WindowsNode>)> fact_on(host, 'operatingsystem')el7 18:01:45$ facter --json "operatingsystem" |
{
|
"operatingsystem": "CentOS" |
}el7 executed in 0.15 seconds |
=> "CentOS" |