puppetlabs-peadm
puppetlabs-peadm copied to clipboard
peadm::convert doesn't update 'PE Master' without rules
Describe the Bug
The task has the following code fragment:
def modify_pe_master_rules(rules)
# If not an array, return as is
return rules unless rules.is_a?(Array)
It's not clear, why such condition exists, it should at least emit a warning, but, in my case I had no rules defined so rules is a nil. IMHO, this should be treated as an empty array
Expected Behavior
Plan should add rules if they don't exist
This seems presumptuous
https://github.com/puppetlabs/puppetlabs-peadm/blob/main/tasks/update_pe_master_rules.rb#L67
Why result[1] ?