Created
September 10, 2018 19:51
-
-
Save ericlake/01cec9e57749f2b7a6ac9f03a57f9f28 to your computer and use it in GitHub Desktop.
serverspec stuff
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
require 'serverspec' | |
set :backend, :exec | |
describe iptables do | |
it { should have_rule('-A INPUT -p tcp -m tcp --dport 22 -j ACCEPT') } | |
it { should have_rule('-A INPUT -s 10.10.10.10/32 -p tcp -m tcp --dport 80 -j ACCEPT') } | |
it { should have_rule('-A INPUT -p tcp -m tcp --dport 80 -j REJECT') } | |
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
require "serverspec" | |
require "pathname" | |
# Set backend type | |
set :backend, :exec | |
RSpec.configure do |c| | |
c.path = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment