Enabled: false
Style/ExtraSpacing:
Enabled: false
+Style/EmptyCaseCondition:
+ Enabled: false
Style/FileName:
Enabled: false
Style/LeadingCommentSpace:
Enabled: false
Style/SpaceBeforeFirstArg:
Enabled: false
+Style/SpaceInsideBlockBraces:
+ Enabled: false
+Style/SpaceInsidePercentLiteralDelimiters:
+ Enabled: false
Style/TrailingCommaInLiteral:
- EnforcedStyleForMultiline: comma
+ EnforcedStyleForMultiline: consistent_comma
Style/WordArray:
Enabled: false
namespace :style do
desc 'Run Ruby style checks'
- RuboCop::RakeTask.new(:ruby)
+ RuboCop::RakeTask.new(:ruby) do |t|
+ t.options = [
+ '--auto-gen-config', # creates .rubocop_todo.yml
+ ]
+ end
desc 'Run Chef style checks'
FoodCritic::Rake::LintTask.new(:chef) do |t|
license 'Apache 2.0'
description 'Installs/Configures chef_utils'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
-version '0.8.1'
+version IO.read(File.join(File.dirname(__FILE__), 'version')).chomp
source_url 'http://scm.osdn.jp/gitroot/metasearch/grid-chef-repo.git'
issues_url 'https://osdn.jp/projects/metasearch/ticket'
+chef_version '>= 12'
+%w( centos redhat ).each do |os|
+ supports os, '>= 7.0'
+end
+supports 'debian', '>= 8.0'
+supports 'ubuntu', '>= 14.04'
+
depends 'build-essential'
depends 'ssl_cert'
expected_version = "[ \"$(chef-client -v | awk '{ print $2 }')\" = '#{version}' ]"
status_file = '/tmp/install_chef-client_status'
+# Pinning chef version
+template '/etc/apt/preferences.d/chef.pref' do
+ source 'etc/apt/preferences.d/chef.pref'
+ owner 'root'
+ group 'root'
+ mode '0644'
+ variables(
+ pkg_name: 'chef'
+ )
+ only_if { node['platform_family'] == 'debian' }
+end
+
remote_file pkg_file_path do
source release_url
checksum file_checksum unless file_checksum.nil?
--- /dev/null
+Package: <%= @pkg_name %>
+Pin: version <%= node['chef_utils']['chef-client']['version'] %>*
+Pin-Priority: 1001