Sha256: ec4988deb7da2c4876185c3ba4535978c41aff2f0a3b0e0e4ea2f93547d6d1aa

Contents?: true

Size: 533 Bytes

Versions: 6

Compression:

Stored size: 533 Bytes

Contents

ruby_block "get ip" do
  block do
    tf_state = JSON.parse(File.read("#{node['chef-acceptance']['suite-dir']}/terraform/terraform.tfstate"))
    node.default["ip"] = tf_state["modules"].first["resources"]["aws_instance.mixlib_install_ps1"]["primary"]["attributes"]["public_ip"]
  end
end

execute "run inspec" do
  command lazy { "inspec exec verify.rb -t winrm://Administrator@#{node['ip']} --password '#{ENV['TF_VAR_admin_password'] || 'Pas5w0rD'}'" }
  cwd "#{node['chef-acceptance']['suite-dir']}/inspec"
  # sensitive true
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
mixlib-install-2.1.0 acceptance/powershell_install_ps1/.acceptance/acceptance-cookbook/recipes/verify.rb
mixlib-install-2.0.4 acceptance/powershell_install_ps1/.acceptance/acceptance-cookbook/recipes/verify.rb
mixlib-install-2.0.3 acceptance/powershell_install_ps1/.acceptance/acceptance-cookbook/recipes/verify.rb
mixlib-install-2.0.2 acceptance/powershell_install_ps1/.acceptance/acceptance-cookbook/recipes/verify.rb
mixlib-install-2.0.1 acceptance/powershell/.acceptance/acceptance-cookbook/recipes/verify.rb
mixlib-install-2.0.0 acceptance/powershell/.acceptance/acceptance-cookbook/recipes/verify.rb