Sha256: 2162dc3fe99ed8a9a54099bf43b6e8da8e779d86e51e0b84611b1a7cd3a47905
Contents?: true
Size: 571 Bytes
Versions: 9
Compression:
Stored size: 571 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
9 entries across 9 versions & 1 rubygems