Sha256: af690a664a04a79586472abc5506b4ba7090d7d1f985ec6aa3a65f12de0f8bc7

Contents?: true

Size: 572 Bytes

Versions: 42

Compression:

Stored size: 572 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 $WINDOWS_PASSWORD" }
  cwd "#{node['chef-acceptance']['suite-dir']}/inspec"
  environment(
    "WINDOWS_PASSWORD" => ENV["TF_VAR_admin_password"] || "Pas5w0rD"
  )
end

Version data entries

42 entries across 29 versions & 1 rubygems

Version Path
mixlib-install-3.9.0 acceptance/windows-server-2012r2-ps1/.acceptance/acceptance-cookbook/recipes/verify.rb
mixlib-install-3.9.0 acceptance/windows-server-2012r2-once/.acceptance/acceptance-cookbook/recipes/verify.rb
mixlib-install-3.9.0 acceptance/windows-server-2012r2-checksum/.acceptance/acceptance-cookbook/recipes/verify.rb
mixlib-install-3.8.0 acceptance/windows-server-2012r2-checksum/.acceptance/acceptance-cookbook/recipes/verify.rb
mixlib-install-3.8.0 acceptance/windows-server-2012r2-once/.acceptance/acceptance-cookbook/recipes/verify.rb
mixlib-install-3.8.0 acceptance/windows-server-2012r2-ps1/.acceptance/acceptance-cookbook/recipes/verify.rb
mixlib-install-3.7.0 acceptance/windows-server-2012r2-checksum/.acceptance/acceptance-cookbook/recipes/verify.rb
mixlib-install-3.7.0 acceptance/windows-server-2012r2-once/.acceptance/acceptance-cookbook/recipes/verify.rb
mixlib-install-3.7.0 acceptance/windows-server-2012r2-ps1/.acceptance/acceptance-cookbook/recipes/verify.rb
mixlib-install-3.6.0 acceptance/windows-server-2012r2-ps1/.acceptance/acceptance-cookbook/recipes/verify.rb
mixlib-install-3.6.0 acceptance/windows-server-2012r2-once/.acceptance/acceptance-cookbook/recipes/verify.rb
mixlib-install-3.6.0 acceptance/windows-server-2012r2-checksum/.acceptance/acceptance-cookbook/recipes/verify.rb
mixlib-install-3.5.1 acceptance/windows-server-2012r2-checksum/.acceptance/acceptance-cookbook/recipes/verify.rb
mixlib-install-3.5.1 acceptance/windows-server-2012r2-ps1/.acceptance/acceptance-cookbook/recipes/verify.rb
mixlib-install-3.5.1 acceptance/windows-server-2012r2-once/.acceptance/acceptance-cookbook/recipes/verify.rb
mixlib-install-3.5.0 acceptance/windows-server-2012r2-checksum/.acceptance/acceptance-cookbook/recipes/verify.rb
mixlib-install-3.5.0 acceptance/windows-server-2012r2-once/.acceptance/acceptance-cookbook/recipes/verify.rb
mixlib-install-3.5.0 acceptance/windows-server-2012r2-ps1/.acceptance/acceptance-cookbook/recipes/verify.rb
mixlib-install-3.4.0 acceptance/windows-server-2012r2-once/.acceptance/acceptance-cookbook/recipes/verify.rb
mixlib-install-3.4.0 acceptance/windows-server-2012r2/.acceptance/acceptance-cookbook/recipes/verify.rb