Skip to content

Commit

Permalink
Updates the compliance version
Browse files Browse the repository at this point in the history
  • Loading branch information
Franklin Webber committed Jul 9, 2016
1 parent e50dc14 commit f9fdc12
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
2 changes: 1 addition & 1 deletion compliance-windows.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"source_ami": "ami-9a0558f0",
"instance_type": "m3.large",
"winrm_username": "Administrator",
"ami_name": "Compliance - Windows 2012 - 1.0.2"
"ami_name": "Compliance - Windows 2012 - 1.0.3"
}],

"provisioners": [
Expand Down
19 changes: 10 additions & 9 deletions cookbooks/workstations/recipes/compliance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@
#
# Copyright (c) 2016 The Authors, All Rights Reserved.

#
# Ensure the package repository is all up-to-date. This is essential
# because sometimes the packages will fail to install because of a
# stale package repository.
#
# @note This command is not idempotent. A better command may existin within the yum cookbook.
#
execute "yum update -y"

chef_ingredient 'chefdk' do
action :install
channel :stable
Expand All @@ -17,16 +26,8 @@
# required to get the right user to have it installed. Without it the root
# user was getting the kitchen-docker gem
#
execute 'sudo su -c "chef exec gem install inspec -v 0.14.07" -s /bin/sh chef'
execute 'sudo su -c "chef exec gem install inspec -v 0.22.1" -s /bin/sh chef'

#
# Ensure the package repository is all up-to-date. This is essential
# because sometimes the packages will fail to install because of a
# stale package repository.
#
# @note This command is not idempotent. A better command may existin within the yum cookbook.
#
execute "yum update -y"

needed_packages_for_attendees = %w[ vim nano emacs git tree ]
package needed_packages_for_attendees
Expand Down
2 changes: 1 addition & 1 deletion scripts/compliance-windows.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ Set-ItemProperty . -Name Path -Value $PathWithInSpec
Pop-Location

# Update the InSpec Version to one that is known to work on Windows
Invoke-Expression "chef gem install inspec -v 0.14.7"
Invoke-Expression "chef gem install inspec -v 0.22.1"

0 comments on commit f9fdc12

Please sign in to comment.