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

empty configuration parameters when using hiera #4

Open
cova-fe opened this issue Oct 30, 2015 · 0 comments
Open

empty configuration parameters when using hiera #4

cova-fe opened this issue Oct 30, 2015 · 0 comments

Comments

@cova-fe
Copy link

cova-fe commented Oct 30, 2015

Hi all,
I'm using this module with hiera-provided parameters. I'm not sure if this is due to hiera usage, but in configuration file created by the module appears all the options with empty value.
say:
cmd_preexec
Of course there is no mention of this parameter in module configuration, and this causes rsnapshot to complain.

I solved this issue modifying the config.erb template, adding something like this:

OPTIONS

<% @options.each do |option,value| -%>
<%- if value.to_s != 'undef' and value.to_s != ''-%>
<%= option %> <%= value %>
<%- end -%>
<% end -%>

But I'm not sure if this is the right way, it seems that in my setup strings are not undef but empty.

(if this is the right solution, I can prepare a pull request).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant