Skip to content
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

Fixes some autosign.conf issues (comments, EOL on last line) #59

Closed
wants to merge 3 commits into from

Conversation

vStone
Copy link
Contributor

@vStone vStone commented Jan 21, 2013

Ignore commented lines when reading all certificates in autosign and make sure the autosign file contains a EOL on the last line

@@ -59,7 +59,7 @@ def autosign certname

# list of hosts which are now allowed to be installed via autosign
def autosign_list
File.exist?(autosign_file) ? File.read(autosign_file).split : []
File.exist?(autosign_file) ? File.read(autosign_file).split("\n").reject { |v| v =~ /^\s*#.*|^$/ } : []
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change to split means trailing spaces aren't stripped any more, perhaps add a .map {|v| v.chomp} or similar?

@domcleal
Copy link
Contributor

+1 tested OK, with one comment above.

@vStone
Copy link
Contributor Author

vStone commented Jan 22, 2013

Also, there seem to be no tests for parsing the autosign file? :/

@domcleal
Copy link
Contributor

@vStone thanks. Indeed, contributions welcome!

@vStone
Copy link
Contributor Author

vStone commented Jan 29, 2013

Added some tests and also fix some other tests that were failing for no good (trivial) reason.

@ohadlevy
Copy link
Member

@domcleal mind giving this a go if you have time before puppetcamp? I know I wont :(

@domcleal
Copy link
Contributor

👍 to 4ddfc7f and 4fa205c, thanks for doing that! For 4884d4a I'd prefer to merge GH-52 which modifies settings rather than explicitly loading subsystems.

@ohadlevy
Copy link
Member

merged without 4884d4a - thanks @vStone!

@ohadlevy ohadlevy closed this Jan 30, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants