-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from bonusbits/dev
v1.1.0
- Loading branch information
Showing
17 changed files
with
275 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
require_relative '../helpers/os_queries' | ||
|
||
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: 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 | ||
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 'Java Install' do | ||
it 'Installed' do | ||
expect(package(java_package_name)).to be_installed | ||
end | ||
if specify_version | ||
it "Version: (#{java_version})" do | ||
expect(package(java_package_name).version).to match(java_version) | ||
end | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.