Created
January 16, 2016 13:07
-
-
Save sathlan/a39b3877c5c221e56104 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
Modified lib/puppet/provider/mongodb.rb | |
diff --git a/lib/puppet/provider/mongodb.rb b/lib/puppet/provider/mongodb.rb | |
index 6bbc350..d82fa83 100644 | |
--- a/lib/puppet/provider/mongodb.rb | |
+++ b/lib/puppet/provider/mongodb.rb | |
@@ -55,8 +55,11 @@ class Puppet::Provider::Mongodb < Puppet::Provider | |
if bindip | |
first_ip_in_list = bindip.split(',').first | |
- if first_ip_in_list.eql? '0.0.0.0' | |
+ case first_ip_in_list | |
+ when '0.0.0.0' | |
ip_real = '127.0.0.1' | |
+ when '::0' | |
# bracket or not ? | |
+ ip_real = '[::1]' | |
else | |
ip_real = first_ip_in_list | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment