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 #17504, #15619 - use generated puppet.conf when running Puppet #197

Merged
merged 1 commit into from
Jan 4, 2017

Conversation

domcleal
Copy link
Contributor

@domcleal domcleal commented Dec 1, 2016

No description provided.

'hiera_config' => hiera.config_path,
'noop' => !!noop?,
'profile' => !!profile?,
'show_diff' => false,
Copy link
Member

Choose a reason for hiding this comment

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

based on jenkins finding, trailing comma does not work in Ruby 1.8

def write_config
@logger.debug("Writing Puppet config file at #{@temp_file.path}")
@temp_file.open
@temp_file.truncate(0)
Copy link
Member

Choose a reason for hiding this comment

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

just out of curiosity, is this because of race condition even when using Tempfile?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's in case the method is called twice so the file gets overwritten fully.

@ares
Copy link
Member

ares commented Dec 1, 2016

Except the 1.8 issue it looks good.

@domcleal
Copy link
Contributor Author

domcleal commented Dec 2, 2016

PR updated with the trailing comma removed.

Edit: and unpredictable ordering of the settings in puppet.conf under Ruby 1.8.7 fixed, now sorted by setting name.

@ares
Copy link
Member

ares commented Jan 4, 2017

Thanks @domcleal, merging.

@ares ares merged commit 88f99ae into theforeman:master Jan 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants