Skip to content

empty configuration parameters when using hiera #4

@cova-fe

Description

@cova-fe

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions