Skip to content
This repository has been archived by the owner on Jul 11, 2020. It is now read-only.

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
dwradcliffe committed Jul 7, 2014
1 parent 6886d52 commit 7b97b73
Show file tree
Hide file tree
Showing 12 changed files with 47 additions and 15 deletions.
2 changes: 2 additions & 0 deletions .rubocop.yml
Expand Up @@ -11,3 +11,5 @@ NumericLiterals:
Enabled: false
LineLength:
Enabled: false
Style/WordArray:
MinSize: 2
13 changes: 7 additions & 6 deletions Rakefile
@@ -1,6 +1,7 @@
require 'rubocop/rake_task'
require 'foodcritic'
require 'rspec/core/rake_task'
require 'English'

desc 'Run RuboCop style and lint checks'
RuboCop::RakeTask.new(:rubocop)
Expand All @@ -21,17 +22,17 @@ desc 'Run ChefSpec examples'
RSpec::Core::RakeTask.new(:spec)

desc 'Run all tests'
task :test => [:rubocop, :foodcritic, :spec]
task :default => :test
task :lint => :foodcritic
task test: [:rubocop, :foodcritic, :spec]
task default: :test
task lint: :foodcritic

begin
require 'kitchen/rake_tasks'
Kitchen::RakeTasks.new

desc 'Alias for kitchen:all'
task :integration => 'kitchen:all'
task :test_all => [:test, :integration]
task integration: 'kitchen:all'
task test_all: [:test, :integration]
rescue LoadError
puts '>>>>> Kitchen gem not loaded, omitting tasks' unless ENV['CI']
end
Expand All @@ -53,6 +54,6 @@ task :refresh_vaults do
].each do |item|
pair = item.split('/')
system "knife vault refresh #{pair[0]} #{pair[1]}"
puts "Successfully updated the #{item} vault" if $?.exitstatus == 0
puts "Successfully updated the #{item} vault" if $CHILD_STATUS.exitstatus == 0
end
end
5 changes: 5 additions & 0 deletions cookbooks/rubygems-apt/recipes/default.rb
@@ -1,3 +1,8 @@
#
# Cookbook Name:: rubygems-apt
# Recipe:: default
#

node.default['apt']['bootstrap'] = false

# We use /etc/apt/sources.list.d/ for everything.
Expand Down
2 changes: 1 addition & 1 deletion cookbooks/rubygems-chef/recipes/default.rb
Expand Up @@ -17,7 +17,7 @@
include_recipe 'chef-client::cron'

service 'chef-client' do
action [ :stop, :disable ]
action [:stop, :disable]
end

node.default['omnibus_updater']['version'] = '11.12.8'
Expand Down
5 changes: 5 additions & 0 deletions cookbooks/rubygems-ci/recipes/default.rb
@@ -1,3 +1,8 @@
#
# Cookbook Name:: rubygems-ci
# Recipe:: default
#

include_recipe 'rubygems'

# TODO: remove these three attributes once https://issues.jenkins-ci.org/browse/JENKINS-22346
Expand Down
5 changes: 5 additions & 0 deletions cookbooks/rubygems-ci/recipes/dns.rb
@@ -1,3 +1,8 @@
#
# Cookbook Name:: rubygems-ci
# Recipe:: dns
#

include_recipe 'chef-vault'

dnsimple_credentials = chef_vault_item('dnsimple', 'credentials')
Expand Down
5 changes: 5 additions & 0 deletions cookbooks/rubygems-cloud-init/recipes/default.rb
@@ -1,3 +1,8 @@
#
# Cookbook Name:: rubygems-cloud-init
# Recipe:: default
#

cookbook_file 'cloud.cfg' do
path '/etc/cloud/cloud.cfg'
end
15 changes: 10 additions & 5 deletions cookbooks/rubygems-fail2ban/recipes/default.rb
@@ -1,10 +1,15 @@
#
# Cookbook Name:: rubygems-fail2ban
# Recipe:: default
#

node.default['fail2ban']['services'] = {
'ssh' => {
"enabled" => "true",
"port" => "ssh",
"filter" => "sshd",
"logpath" => node['fail2ban']['auth_log'],
"maxretry" => "6"
'enabled' => 'true',
'port' => 'ssh',
'filter' => 'sshd',
'logpath' => node['fail2ban']['auth_log'],
'maxretry' => '6'
}
}

Expand Down
5 changes: 5 additions & 0 deletions cookbooks/rubygems-logging/recipes/default.rb
@@ -1,3 +1,8 @@
#
# Cookbook Name:: rubygems-logging
# Recipe:: default
#

include_recipe 'chef-vault'

papertrail_creds = chef_vault_item('papertrail', 'credentials')
Expand Down
2 changes: 1 addition & 1 deletion cookbooks/rubygems-people/recipes/default.rb
Expand Up @@ -12,7 +12,7 @@

next unless user['environments'].include?(node.chef_environment)

if (user['action'] && user['action'] == 'remove')
if user['action'] && user['action'] == 'remove'
user_account user['username'] do
action :remove
only_if "/usr/bin/id -u #{user['username']}"
Expand Down
1 change: 0 additions & 1 deletion cookbooks/rubygems/recipes/default.rb
Expand Up @@ -20,4 +20,3 @@
include_recipe 'rubygems-sensu'
include_recipe 'rubygems-ssh'
include_recipe 'rubygems-utility'

2 changes: 1 addition & 1 deletion cookbooks/rubygems/recipes/ohai.rb
Expand Up @@ -5,4 +5,4 @@
owner 'root'
group node['root_group']
mode '0755'
end
end

0 comments on commit 7b97b73

Please sign in to comment.