Skip to content

Commit

Permalink
add enable_script_security option for global_defs (#73)
Browse files Browse the repository at this point in the history
* add enable_script_security option to global_defs block
* Adding tests for the enable_script_security option within global_defs

Signed-off-by: Jonathan Bach <bach.s.jonathan@gmail.com>
  • Loading branch information
JonathanSBach authored and damacus committed Oct 14, 2019
1 parent 92aeb2a commit becddaf
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -114,6 +114,7 @@ enable_snmp_rfc | TrueClass, FalseClass | nil
enable_snmp_rfcv2 | TrueClass, FalseClass | nil
enable_snmp_rfcv3 | TrueClass, FalseClass | nil
enable_traps | TrueClass, FalseClass | nil
enable_script_security | TrueClass, FalseClass | nil

### Static IP Addresses

Expand Down
1 change: 1 addition & 0 deletions libraries/keepalived.rb
Expand Up @@ -68,6 +68,7 @@ module GlobalDefs
enable_snmp_rfcv2: { kind_of: [TrueClass, FalseClass] },
enable_snmp_rfcv3: { kind_of: [TrueClass, FalseClass] },
enable_traps: { kind_of: [TrueClass, FalseClass] },
enable_script_security: { kind_of: [TrueClass, FalseClass] },
}.freeze
end

Expand Down
1 change: 1 addition & 0 deletions test/fixtures/cookbooks/test/recipes/default.rb
Expand Up @@ -16,6 +16,7 @@
vrrp_mcast_group4 '224.0.0.18'
vrrp_mcast_group6 'ff02::12'
enable_traps true
enable_script_security true
end

keepalived_static_ipaddress 'static_ipaddress' do
Expand Down
4 changes: 4 additions & 0 deletions test/integration/default/serverspec/resources_spec.rb
Expand Up @@ -17,6 +17,10 @@
its(:content) { should match(/router_id my_router/) }
end

describe file('/etc/keepalived/conf.d/global_defs.conf') do
its(:content) { should match(/enable_script_security/) }
end

describe file('/etc/keepalived/conf.d/static_ipaddress.conf') do
its(:content) { should match(/192.168.1.1/) }
end
Expand Down

0 comments on commit becddaf

Please sign in to comment.