Skip to content

puppet-agent expects a value for struct key #21

Answered by XMol
XMol asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks to all the support found on Puppet Slack! We determined that the issue is not with the input data, nor with the custom Puppet data type or the multipath class, but in fact the ERB template. It processes the hash of multipaths like this:

multipaths {
<% @config['multipaths'].sort { |x, y| x['wwid'] <=> y['wwid'] }.each do |multipath| -%>
  multipath {
    <%-# Start each multipath subsection with the wwid. -%>
    wwid <%= multipath.delete('wwid') %>
    <%- multipath.keys.sort.each do |k| -%>
    <%= k %> <%= multipath[k] %>
    <%- end -%>

<% end -%>

The issue is triggered by multipath.delete('wwid'). It obviously removes the wwid key and value from the hash. And when the t…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by XMol
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant