From c3946d857975bc9cfa1e82361ef91b786a6ef631 Mon Sep 17 00:00:00 2001 From: Levon Becker Date: Fri, 27 Oct 2017 16:10:01 -0700 Subject: [PATCH 1/8] 1.1.0 - Read Changelog --- CHANGELOG.md | 7 ++ Gemfile | 6 +- Gemfile.lock | 134 ++++++++++++++++++++++++++++++++++++ README.md | 2 + circle.yml | 2 +- controls/aws.rb | 6 +- controls/backups.rb | 19 +++++ controls/cloudwatch.rb | 26 +++++++ controls/cloudwatch_logs.rb | 30 ++++---- controls/epel.rb | 6 +- controls/java.rb | 26 +++++++ controls/node_info.rb | 10 +-- controls/proxy.rb | 6 +- controls/selinux.rb | 8 +-- controls/sudoers.rb | 6 +- controls/yum_cron.rb | 16 ++--- inspec.yml | 2 +- 17 files changed, 265 insertions(+), 47 deletions(-) create mode 100644 Gemfile.lock create mode 100755 controls/backups.rb create mode 100755 controls/cloudwatch.rb create mode 100755 controls/java.rb diff --git a/CHANGELOG.md b/CHANGELOG.md index 08bc7c4..329ce57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # CHANGE LOG +## 1.1.0 - 06/14/2017 - Levon Becker +* Added Backups Tests +* Added CloudWatch Tests +* Simplified configure args local variable to be named the same +* Added Gemfile.lock to keep CircleCI in-line for testing +* Added Java Install Tests + ## 1.0.5 - 04/17/2017 - Levon Becker * Switch attribute/arg for inside_aws to discovery method. diff --git a/Gemfile b/Gemfile index ee8db4c..32bbd1b 100644 --- a/Gemfile +++ b/Gemfile @@ -1,8 +1,8 @@ source 'https://rubygems.org' -gem 'inspec', '~> 1.11' -gem 'rake', '~> 12.0.0' +gem 'inspec', '~> 1.25.0' +gem 'rake', '~> 10.4' group :style do - gem 'rubocop', '~> 0.46.0' + gem 'rubocop', '~> 0.47.0' end diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 0000000..9bbeb61 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,134 @@ +GEM + remote: https://rubygems.org/ + specs: + addressable (2.4.0) + ast (2.3.0) + blankslate (2.1.2.4) + builder (3.2.3) + coderay (1.1.1) + diff-lcs (1.3) + docker-api (1.33.3) + excon (>= 0.38.0) + json + erubis (2.7.0) + excon (0.55.0) + faraday (0.9.2) + multipart-post (>= 1.2, < 3) + ffi (1.9.18) + gssapi (1.2.0) + ffi (>= 1.0.1) + gyoku (1.3.1) + builder (>= 2.1.2) + hashie (3.5.6) + httpclient (2.8.3) + inspec (1.25.1) + addressable (~> 2.4) + faraday (>= 0.9.0) + hashie (~> 3.4) + json (>= 1.8, < 3.0) + method_source (~> 0.8) + mixlib-log + parallel (~> 1.9) + parslet (~> 1.5) + pry (~> 0) + rainbow (~> 2) + rspec (~> 3) + rspec-its (~> 1.2) + rubyzip (~> 1.1) + semverse + sslshake (~> 1.2) + thor (~> 0.19) + toml (~> 0.1) + train (>= 0.22.0, < 1.0) + json (1.8.6) + little-plugger (1.1.4) + logging (2.2.0) + little-plugger (~> 1.1) + multi_json (~> 1.10) + method_source (0.8.2) + mixlib-log (1.7.1) + mixlib-shellout (2.3.2) + multi_json (1.12.1) + multipart-post (2.0.0) + net-scp (1.2.1) + net-ssh (>= 2.6.5) + net-ssh (4.1.0) + nori (2.6.0) + parallel (1.11.1) + parser (2.4.0.0) + ast (~> 2.2) + parslet (1.5.0) + blankslate (~> 2.0) + powerpack (0.1.1) + pry (0.10.4) + coderay (~> 1.1.0) + method_source (~> 0.8.1) + slop (~> 3.4) + rainbow (2.2.2) + rake + rake (10.5.0) + rspec (3.6.0) + rspec-core (~> 3.6.0) + rspec-expectations (~> 3.6.0) + rspec-mocks (~> 3.6.0) + rspec-core (3.6.0) + rspec-support (~> 3.6.0) + rspec-expectations (3.6.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.6.0) + rspec-its (1.2.0) + rspec-core (>= 3.0.0) + rspec-expectations (>= 3.0.0) + rspec-mocks (3.6.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.6.0) + rspec-support (3.6.0) + rubocop (0.47.1) + parser (>= 2.3.3.1, < 3.0) + powerpack (~> 0.1) + rainbow (>= 1.99.1, < 3.0) + ruby-progressbar (~> 1.7) + unicode-display_width (~> 1.0, >= 1.0.1) + ruby-progressbar (1.8.1) + rubyntlm (0.6.1) + rubyzip (1.2.1) + semverse (2.0.0) + slop (3.6.0) + sslshake (1.2.0) + thor (0.19.1) + toml (0.1.2) + parslet (~> 1.5.0) + train (0.23.0) + docker-api (~> 1.26) + json (>= 1.8, < 3.0) + mixlib-shellout (~> 2.0) + net-scp (~> 1.2) + net-ssh (>= 2.9, < 5.0) + winrm (~> 2.0) + winrm-fs (~> 1.0) + unicode-display_width (1.3.0) + winrm (2.2.1) + builder (>= 2.1.2) + erubis (~> 2.7) + gssapi (~> 1.2) + gyoku (~> 1.0) + httpclient (~> 2.2, >= 2.2.0.2) + logging (>= 1.6.1, < 3.0) + nori (~> 2.0) + rubyntlm (~> 0.6.0, >= 0.6.1) + winrm-fs (1.0.1) + erubis (~> 2.7) + logging (>= 1.6.1, < 3.0) + rubyzip (~> 1.1) + winrm (~> 2.0) + +PLATFORMS + ruby + +DEPENDENCIES + inspec (~> 1.25.0) + rake (~> 10.4) + rubocop (~> 0.47.0) + +BUNDLED WITH + 1.12.5 diff --git a/README.md b/README.md index f758886..8893fe1 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # InSpec Bonus Bits Base Cookbook Profile +[![Project Release](https://img.shields.io/badge/release-v1.1.0-blue.svg)](https://github.com/bonusbits/bonusbits_base) [![CircleCI](https://circleci.com/gh/bonusbits/inspec_bonusbits_base.svg?style=shield)](https://circleci.com/gh/bonusbits/inspec_bonusbits_base) [![Join the chat at https://gitter.im/bonusbits](https://badges.gitter.im/bonusbits/bonusbits.svg)](https://gitter.im/bonusbits?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +[![GitHub issues](https://img.shields.io/github/issues/bonusbits/inspec_bonusbits_base.svg)](https://github.com/bonusbits/inspec_bonusbits_base/issues) Used to run integration tests for when using the [bonusbits_base](https://github.com/bonusbits/bonusbits_base) Chef Cookbook. diff --git a/circle.yml b/circle.yml index 632f47a..e0f5d1d 100644 --- a/circle.yml +++ b/circle.yml @@ -3,7 +3,7 @@ jobs: build: working_directory: ~/circulate docker: - - image: chef/chefdk:1.2.22 + - image: chef/chefdk:1.3.32 steps: - checkout - run: diff --git a/controls/aws.rb b/controls/aws.rb index 9462cc5..8c79138 100755 --- a/controls/aws.rb +++ b/controls/aws.rb @@ -1,17 +1,17 @@ require_relative '../helpers/os_queries' inside_aws = ec2? -configure_aws_profile = attribute('configure_aws_profile', default: true, description: 'Configure Proxy').to_s.eql?('true') ? true : false +configure = attribute('configure_aws_profile', default: true, description: 'Configure Proxy').to_s.eql?('true') ? true : false debug = attribute('debug', default: false, description: 'Enable Debugging').to_s.eql?('true') ? true : false -puts "ATTR: Configure AWS Profile (#{configure_aws_profile})" if debug +puts "ATTR: Configure AWS Profile (#{configure})" if debug profile_settings = %w( AWS_REGION ) if os.linux? && inside_aws - if configure_aws_profile + if configure describe 'AWS Profile' do it 'Configured' do profile_settings.each do |value| diff --git a/controls/backups.rb b/controls/backups.rb new file mode 100755 index 0000000..40cfd79 --- /dev/null +++ b/controls/backups.rb @@ -0,0 +1,19 @@ +require_relative '../helpers/os_queries' + +inside_aws = ec2? +configure = attribute('configure_backups', default: false, description: 'Configure Backups').to_s.eql?('true') ? true : false + +debug = attribute('debug', default: false, description: 'Enable Debugging').to_s.eql?('true') ? true : false +if debug + puts "ATTR: Inside AWS (#{inside_aws})" + puts "ATTR: Configure Backups (#{configure})" +end + +if os.linux? && configure + describe 'Backup Script' do + it '/usr/bin/backup_to_s3.rb' do + expect(file('/usr/bin/backup_to_s3.rb')).to exist + expect(file('/usr/bin/backup_to_s3.rb')).to be_owned_by('root') + end + end +end diff --git a/controls/cloudwatch.rb b/controls/cloudwatch.rb new file mode 100755 index 0000000..41c6c66 --- /dev/null +++ b/controls/cloudwatch.rb @@ -0,0 +1,26 @@ +require_relative '../helpers/os_queries' + +inside_aws = ec2? +configure = attribute('configure_cloudwatch', default: true, description: 'Configure CloudWatch Monitoring').to_s.eql?('true') ? true : false + +debug = attribute('debug', default: false, description: 'Enable Debugging').to_s.eql?('true') ? true : false +if debug + puts "ATTR: Inside AWS (#{inside_aws})" + puts "ATTR: Configure CloudWatch (#{configure})" +end + +if os.linux? && configure + describe 'CloudWatch Monitoring' do + it 'Scripts' do + expect(file('/opt/aws-scripts-mon/mon-put-instance-data.pl')).to exist + expect(file('/opt/aws-scripts-mon/mon-put-instance-data.pl')).to be_owned_by('root') + end + + if inside_aws + it 'Cron' do + expect(service('awslogs')).to be_enabled + expect(service('awslogs')).to be_running + end + end + end +end diff --git a/controls/cloudwatch_logs.rb b/controls/cloudwatch_logs.rb index b7799cf..f4f3c3d 100755 --- a/controls/cloudwatch_logs.rb +++ b/controls/cloudwatch_logs.rb @@ -1,32 +1,36 @@ require_relative '../helpers/os_queries' +# Can not call method in Describe call, but can use local variable as condition. inside_aws = ec2? -configure_cloudwatch_logs = attribute('configure_cloudwatch_logs', default: true, description: 'Configure CloudWatch Logs').to_s.eql?('true') ? true : false +amazon = amazon? +configure = attribute('configure_cloudwatch_logs', default: true, description: 'Configure CloudWatch Logs').to_s.eql?('true') ? true : false debug = attribute('debug', default: false, description: 'Enable Debugging').to_s.eql?('true') ? true : false if debug - puts "ATTR: Inside AWS (#{inside_aws})" - puts "ATTR: Configure CloudWatch Logs (#{configure_cloudwatch_logs})" + puts "ATTR: Inside AWS (#{inside_aws})" + puts "ATTR: Configure CloudWatch Logs (#{configure})" end -if os.linux? && configure_cloudwatch_logs +if os.linux? && configure describe 'CloudWatch Logs' do - it 'awslogs installed' do - expect(package('awslogs')).to be_installed + if amazon + it 'Agent RPM' do + expect(package('awslogs')).to be_installed + end end - it 'has awscli.conf' do + it 'awscli.conf' do expect(file('/etc/awslogs/awscli.conf')).to exist expect(file('/etc/awslogs/awscli.conf')).to be_owned_by('root') end - it 'has awslogs.conf' do - expect(file('/etc/awslogs/awslogs.conf')).to exist - expect(file('/etc/awslogs/awslogs.conf')).to be_owned_by('root') - end - if inside_aws - it 'awslogs service' do + it 'awslogs.conf' do + expect(file('/etc/awslogs/awslogs.conf')).to exist + expect(file('/etc/awslogs/awslogs.conf')).to be_owned_by('root') + end + + it 'Service' do expect(service('awslogs')).to be_enabled expect(service('awslogs')).to be_running end diff --git a/controls/epel.rb b/controls/epel.rb index 63c7150..7b6ee9d 100755 --- a/controls/epel.rb +++ b/controls/epel.rb @@ -1,16 +1,16 @@ require_relative '../helpers/os_queries' -configure_epel = attribute('configure_epel', default: false, description: 'Configure EPEL').to_s.eql?('true') ? true : false +configure = attribute('configure_epel', default: false, description: 'Configure EPEL').to_s.eql?('true') ? true : false install_epel_packages = attribute('install_epel_packages', default: false, description: 'Install EPEL Packages').to_s.eql?('true') ? true : false debug = attribute('debug', default: false, description: 'Enable Debugging').to_s.eql?('true') ? true : false if debug - puts "ATTR: Configure EPEL (#{configure_epel})" + puts "ATTR: Configure EPEL (#{configure})" puts "ATTR: Install EPEL Packages (#{install_epel_packages})" end if os.redhat? - if configure_epel + if configure # Verify EPEL is setup describe 'EPEL Repo' do it 'Setup' do diff --git a/controls/java.rb b/controls/java.rb new file mode 100755 index 0000000..07e983b --- /dev/null +++ b/controls/java.rb @@ -0,0 +1,26 @@ +require_relative '../helpers/os_queries' + +install_java = attribute('install_java', default: true, description: 'Install Java').to_s.eql?('true') ? true : false +java_package_name = attribute('java_package_name', default: 'java-1.8.0-openjdk', description: 'Java Version') +specify_version = attribute('specify_version', default: true, description: 'Specify Version').to_s.eql?('true') ? true : false +java_version = attribute('java_version', default: '1.8.0.141-1.b16.el7_3', description: 'Java Version') + +debug = attribute('debug', default: false, description: 'Enable Debugging').to_s.eql?('true') ? true : false +if debug + puts "ATTR: Install Java (#{install_java})" + puts "ATTR: Java Package (#{java_package_name})" + puts "ATTR: Specify Version (#{specify_version})" + puts "ATTR: Java Version (#{java_version})" +end + +# Check if Installed +if install_java + if os.linux? + describe package(java_package_name) do + it { should be_installed } + its('version') { should eq '1.8.0.141-1.b16.el7_3' } + end + else + return + end +end diff --git a/controls/node_info.rb b/controls/node_info.rb index 303f5cb..472c2bc 100755 --- a/controls/node_info.rb +++ b/controls/node_info.rb @@ -1,20 +1,20 @@ require_relative '../helpers/os_queries' -configure_node_info = attribute('configure_node_info', default: true, description: 'Configure Node Info').to_s.eql?('true') ? true : false +configure = attribute('configure_node_info', default: true, description: 'Configure Node Info').to_s.eql?('true') ? true : false debug = attribute('debug', default: false, description: 'Enable Debugging').to_s.eql?('true') ? true : false -puts "ATTR: Configure NodeInfo (#{configure_node_info})" if debug +puts "ATTR: Configure NodeInfo (#{configure})" if debug -if configure_node_info +if configure if os.linux? describe 'Nodeinfo Script' do - it 'has /usr/local/bin/nodeinfo' do + it '/usr/local/bin/nodeinfo' do expect(file('/usr/local/bin/nodeinfo')).to exist end end elsif os.windows? describe 'Nodeinfo Script' do - it 'has C:/Windows/System32/nodeinfo.cmd' do + it 'C:/Windows/System32/nodeinfo.cmd' do expect(file('C:/Windows/System32/nodeinfo.cmd')).to exist end end diff --git a/controls/proxy.rb b/controls/proxy.rb index 20f9570..e1da361 100755 --- a/controls/proxy.rb +++ b/controls/proxy.rb @@ -1,9 +1,9 @@ require_relative '../helpers/os_queries' -configure_proxy = attribute('configure_proxy', default: false, description: 'Configure Proxy').to_s.eql?('true') ? true : false +configure = attribute('configure_proxy', default: false, description: 'Configure Proxy').to_s.eql?('true') ? true : false debug = attribute('debug', default: false, description: 'Enable Debugging').to_s.eql?('true') ? true : false -puts "ATTR: Configure Proxy (#{configure_proxy})" if debug +puts "ATTR: Configure Proxy (#{configure})" if debug proxy_settings = %w( ftp_proxy=http://10.0.2.2:8888 @@ -17,7 +17,7 @@ ) if os.linux? - if configure_proxy + if configure describe 'Network Proxy' do it 'Configured' do proxy_settings.each do |proxy_setting| diff --git a/controls/selinux.rb b/controls/selinux.rb index fc1370f..1e09e2b 100755 --- a/controls/selinux.rb +++ b/controls/selinux.rb @@ -1,13 +1,13 @@ require_relative '../helpers/os_queries' -configure_selinux = attribute('configure_selinux', default: true, description: 'Configure Selinux').to_s.eql?('true') ? true : false +configure = attribute('configure_selinux', default: true, description: 'Configure Selinux').to_s.eql?('true') ? true : false debug = attribute('debug', default: false, description: 'Enable Debugging').to_s.eql?('true') ? true : false -puts "ATTR: Configure SeLinux (#{configure_selinux})" if debug +puts "ATTR: Configure SeLinux (#{configure})" if debug unless docker? - if os.redhat? && configure_selinux - describe 'SELinux' do + if os.redhat? && configure + describe 'SELinux Setting' do it 'Disabled' do expect(file('/etc/selinux/config').content).to match(/SELINUX=disabled/) end diff --git a/controls/sudoers.rb b/controls/sudoers.rb index afad4a8..1d46ec5 100755 --- a/controls/sudoers.rb +++ b/controls/sudoers.rb @@ -1,11 +1,11 @@ require_relative '../helpers/os_queries' -configure_sudoers = attribute('configure_sudoers', default: false, description: 'Configure Sudoers').to_s.eql?('true') ? true : false +configure = attribute('configure_sudoers', default: false, description: 'Configure Sudoers').to_s.eql?('true') ? true : false debug = attribute('debug', default: false, description: 'Enable Debugging').to_s.eql?('true') ? true : false -puts "ATTR: Configure Sudoers (#{configure_sudoers})" if debug +puts "ATTR: Configure Sudoers (#{configure})" if debug -if configure_sudoers && rhel_family? +if configure && rhel_family? describe 'Sudoers Config' do it 'has /usr/local/bin in sudoers secure path' do expect(file('/etc/sudoers').content).to match(%r{secure_path = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin$}) diff --git a/controls/yum_cron.rb b/controls/yum_cron.rb index abc3983..f3e4b0c 100755 --- a/controls/yum_cron.rb +++ b/controls/yum_cron.rb @@ -1,36 +1,36 @@ require_relative '../helpers/os_queries' -configure_yum_cron = attribute('configure_yum_cron', default: true, description: 'Configure Yum Cron').to_s.eql?('true') ? true : false +configure = attribute('configure_yum_cron', default: true, description: 'Configure Yum Cron').to_s.eql?('true') ? true : false debug = attribute('debug', default: false, description: 'Enable Debugging').to_s.eql?('true') ? true : false -puts "ATTR: Configure Yum Cron (#{configure_yum_cron})" if debug +puts "ATTR: Configure Yum Cron (#{configure})" if debug -if configure_yum_cron && amazon? +if configure && amazon? describe 'Yum Cron' do it 'yum-cron installed' do expect(package('yum-cron')).to be_installed end - it 'has yum-cron.conf' do + it 'yum-cron.conf' do expect(file('/etc/yum/yum-cron.conf')).to exist expect(file('/etc/yum/yum-cron.conf')).to be_owned_by('root') end - it 'has yum-cron-hourly.conf' do + it 'yum-cron-hourly.conf' do expect(file('/etc/yum/yum-cron-hourly.conf')).to exist expect(file('/etc/yum/yum-cron-hourly.conf')).to be_owned_by('root') end - it 'yum-cron service' do + it 'Service' do expect(service('yum-cron')).to be_enabled expect(service('yum-cron')).to be_running end - it 'yum-cron.conf used correct template' do + it 'yum-cron.conf template used' do expect(file('/etc/yum/yum-cron.conf').content).to match(/^download_updates = yes/) end - it 'yum-cron-hourly.conf used correct template' do + it 'yum-cron-hourly.conf template used' do expect(file('/etc/yum/yum-cron-hourly.conf').content).to match(/^download_updates = no/) end end diff --git a/inspec.yml b/inspec.yml index 0c3b58f..cc5ac62 100644 --- a/inspec.yml +++ b/inspec.yml @@ -5,7 +5,7 @@ copyright: Bonus Bits copyright_email: levon.becker.github@bonusbits.com license: MIT license summary: Check Bonus Bits Base Cookbook Configurations -version: 1.0.4 +version: 1.1.0 supports: - os-family: linux supports: From cf436759c8bb075bf8d499614f0cd5d07da8e092 Mon Sep 17 00:00:00 2001 From: Levon Becker Date: Fri, 27 Oct 2017 16:21:14 -0700 Subject: [PATCH 2/8] Fixed up logic and made Rubocop happy --- controls/java.rb | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/controls/java.rb b/controls/java.rb index 07e983b..4ec7d78 100755 --- a/controls/java.rb +++ b/controls/java.rb @@ -16,11 +16,15 @@ # Check if Installed if install_java if os.linux? - describe package(java_package_name) do - it { should be_installed } - its('version') { should eq '1.8.0.141-1.b16.el7_3' } + # describe package(java_package_name) do + # it { should be_installed } + # its('version') { should eq java_version } + # end + describe 'Java' do + it 'Installed' do + expect(package(java_package_name)).to be_installed + expect(package(java_package_name).version).to be(java_version) if specify_version + end end - else - return end end From eb1e5885f9ff8563191bb3814092fd3c96e20c9b Mon Sep 17 00:00:00 2001 From: Levon Becker Date: Fri, 27 Oct 2017 16:35:14 -0700 Subject: [PATCH 3/8] Fixed java version matching --- controls/java.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/controls/java.rb b/controls/java.rb index 4ec7d78..2c96dbe 100755 --- a/controls/java.rb +++ b/controls/java.rb @@ -20,10 +20,14 @@ # it { should be_installed } # its('version') { should eq java_version } # end - describe 'Java' do + describe 'Java Install' do it 'Installed' do expect(package(java_package_name)).to be_installed - expect(package(java_package_name).version).to be(java_version) if specify_version + end + if specify_version + it "Version: (#{java_version})" do + expect(package(java_package_name).version).to match(java_version) + end end end end From 2aa9384a64bf6dd8f8d83aa9b5c682b834fc4fae Mon Sep 17 00:00:00 2001 From: Levon Becker Date: Fri, 27 Oct 2017 16:35:44 -0700 Subject: [PATCH 4/8] cleanup --- controls/java.rb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/controls/java.rb b/controls/java.rb index 2c96dbe..d75fbce 100755 --- a/controls/java.rb +++ b/controls/java.rb @@ -16,10 +16,6 @@ # Check if Installed if install_java if os.linux? - # describe package(java_package_name) do - # it { should be_installed } - # its('version') { should eq java_version } - # end describe 'Java Install' do it 'Installed' do expect(package(java_package_name)).to be_installed From d734f3d7816b75f52596868ef090480b722353c1 Mon Sep 17 00:00:00 2001 From: Levon Becker Date: Fri, 27 Oct 2017 16:38:59 -0700 Subject: [PATCH 5/8] Updated CircleCI to ChefDK 1.6.1 --- circle.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/circle.yml b/circle.yml index e0f5d1d..5c6862e 100644 --- a/circle.yml +++ b/circle.yml @@ -3,7 +3,7 @@ jobs: build: working_directory: ~/circulate docker: - - image: chef/chefdk:1.3.32 + - image: chef/chefdk:1.6.1 steps: - checkout - run: From 746f51fcc67dfb93edf1f5eb63dedcd31abe7229 Mon Sep 17 00:00:00 2001 From: Levon Becker Date: Fri, 27 Oct 2017 16:51:23 -0700 Subject: [PATCH 6/8] Updated Readme and changed the defaults to false for java install and specifiy version --- README.md | 6 ++++++ controls/java.rb | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8893fe1..f72f08f 100644 --- a/README.md +++ b/README.md @@ -46,10 +46,16 @@ suites: | all | debug | Boolean | false | true/false | | aws | inside_aws | Boolean | false | true/false | | aws | configure_aws_profile | Boolean | true | true/false | +| backups | configure_backups | Boolean | false | true/false | +| cloudwatch | configure_cloudwatch | Boolean | false | true/false | | cloudwatch_logs | inside_aws | Boolean | false | true/false | | cloudwatch_logs | configure_cloudwatch_logs | Boolean | true | true/false | | epel | configure_epel | Boolean | false | true/false | | epel | install_epel_packages | Boolean | false | true/false | +| java | install_java | Boolean | false | true/false | +| java | java_package_name | String | java-1.8.0-openjdk | N/A | +| java | specify_version | Boolean | false | true/false | +| java | java_version | String | 1.8.0.151-1.b12.35.amzn1 | N/A | | node_info | configure_node_info | Boolean | true | true/false | | packages | install_packages | Boolean | true | true/false | | packages | amazon_packages | Array | long list | array of package names | diff --git a/controls/java.rb b/controls/java.rb index d75fbce..ff655e7 100755 --- a/controls/java.rb +++ b/controls/java.rb @@ -1,9 +1,9 @@ require_relative '../helpers/os_queries' -install_java = attribute('install_java', default: true, description: 'Install Java').to_s.eql?('true') ? true : false +install_java = attribute('install_java', default: false, description: 'Install Java').to_s.eql?('true') ? true : false java_package_name = attribute('java_package_name', default: 'java-1.8.0-openjdk', description: 'Java Version') -specify_version = attribute('specify_version', default: true, description: 'Specify Version').to_s.eql?('true') ? true : false -java_version = attribute('java_version', default: '1.8.0.141-1.b16.el7_3', description: 'Java Version') +specify_version = attribute('specify_version', default: false, description: 'Specify Version').to_s.eql?('true') ? true : false +java_version = attribute('java_version', default: '1.8.0.151-1.b12.35.amzn1', description: 'Java Version') debug = attribute('debug', default: false, description: 'Enable Debugging').to_s.eql?('true') ? true : false if debug From b3bb092675e3c409a885e2abcbb3d794ce6672f6 Mon Sep 17 00:00:00 2001 From: Levon Becker Date: Fri, 27 Oct 2017 16:55:46 -0700 Subject: [PATCH 7/8] Fixed link for release badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f72f08f..3e9372a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # InSpec Bonus Bits Base Cookbook Profile -[![Project Release](https://img.shields.io/badge/release-v1.1.0-blue.svg)](https://github.com/bonusbits/bonusbits_base) +[![Project Release](https://img.shields.io/badge/release-v1.1.0-blue.svg)](https://github.com/bonusbits/inspec_bonusbits_base) [![CircleCI](https://circleci.com/gh/bonusbits/inspec_bonusbits_base.svg?style=shield)](https://circleci.com/gh/bonusbits/inspec_bonusbits_base) [![Join the chat at https://gitter.im/bonusbits](https://badges.gitter.im/bonusbits/bonusbits.svg)](https://gitter.im/bonusbits?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![GitHub issues](https://img.shields.io/github/issues/bonusbits/inspec_bonusbits_base.svg)](https://github.com/bonusbits/inspec_bonusbits_base/issues) From fc1c82e74314c193529e48f624da4c5b912f16fa Mon Sep 17 00:00:00 2001 From: Levon Becker Date: Fri, 27 Oct 2017 16:58:58 -0700 Subject: [PATCH 8/8] Updated changelog date --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 329ce57..8e555f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # CHANGE LOG -## 1.1.0 - 06/14/2017 - Levon Becker +## 1.1.0 - 10/27/2017 - Levon Becker * Added Backups Tests * Added CloudWatch Tests * Simplified configure args local variable to be named the same