-
-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
flush IPv6 rules #181
flush IPv6 rules #181
Conversation
Signed-off-by: Daniel Paulus <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this change! I only made one note, just so we don't break anyone who has ipv6 disabled. If you wouldn't mind revising that, I think this is good to merge. Thanks again!
libraries/helpers_firewalld.rb
Outdated
@@ -39,6 +39,8 @@ def firewalld_flush! | |||
|
|||
shell_out!('firewall-cmd', '--direct', '--remove-rules', 'ipv4', 'filter', 'INPUT') | |||
shell_out!('firewall-cmd', '--direct', '--remove-rules', 'ipv4', 'filter', 'OUTPUT') | |||
shell_out!('firewall-cmd', '--direct', '--remove-rules', 'ipv6', 'filter', 'INPUT') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you add a guard for ipv6_enabled?(new_resource)
? Just so we don't run this if ipv6 is disabled? Or confirm that it won't blow up if ipv6 isn't present/enabled on the system?
@dpnl87 Thanks for submitting this PR. Could you take a look at the changes @martinb3 has requested? Thanks! We'd love to accept your first PR :) |
I'll have a look at the change next week when my Holiday starts. Thanks for the patience :) |
Signed-off-by: Daniel Paulus <[email protected]>
Signed-off-by: Daniel Paulus <[email protected]>
@martinb3 I've add the guard. Is this in line with your suggestion? |
This PR fixes #180
This is my first PR into a Chef repo, if something is not right, please advise :)
If I converge a default-centos-72 instance and converge it I have the following output
If I then comment out
firewall_rule 'HTTP HTTPS'
https://github.com/chef-cookbooks/firewall/blob/master/test/fixtures/cookbooks/firewall-test/recipes/default.rb#L109-L114
And re-converge the VM