Class: Kitchen::Pulumi::InSpecWithHosts

Inherits:
Object
  • Object
show all
Defined in:
lib/kitchen/pulumi/inspec_with_hosts.rb

Overview

InSpec instances act as interfaces to the InSpec gem.

Instance Method Summary collapse

Instance Method Details

#exec(system:) ⇒ void

This method returns an undefined value.

exec executes the InSpec controls of an InSpec profile.

Raises:


16
17
18
19
20
21
22
23
24
25
# File 'lib/kitchen/pulumi/inspec_with_hosts.rb', line 16

def exec(system:)
  system.each_host do |host:|
    ::Kitchen::Pulumi::InSpec
      .new(
        options: options.merge(host: host),
        profile_locations: profile_locations,
      )
      .info(message: "#{system}: Verifying host #{host}").exec
  end
end