puppetlabs-peadm icon indicating copy to clipboard operation
puppetlabs-peadm copied to clipboard

peadm::convert doesn't update 'PE Master' without rules

Open vchepkov opened this issue 9 months ago • 1 comments

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

vchepkov avatar Mar 29 '25 12:03 vchepkov

This seems presumptuous https://github.com/puppetlabs/puppetlabs-peadm/blob/main/tasks/update_pe_master_rules.rb#L67 Why result[1] ?

vchepkov avatar Mar 29 '25 12:03 vchepkov