lib/beaker-pe/install/pe_utils.rb in beaker-pe-1.12.1 vs lib/beaker-pe/install/pe_utils.rb in beaker-pe-1.13.0

- old
+ new

@@ -338,14 +338,16 @@ # Pin the master to the node node_group['rule'] = [ "and", [ '=', 'name', master.to_s ]] node_group['classes'] ||= {} end - # add the pe_repo platform class - node_group['classes'][klass] = {} + # add the pe_repo platform class if it's not already present + if ! node_group['classes'].include?(klass) + node_group['classes'][klass] = {} - _console_dispatcher.create_new_node_group_model(node_group) - on master, puppet("agent -t"), :acceptable_exit_codes => [0,2] + _console_dispatcher.create_new_node_group_model(node_group) + on master, puppet("agent -t"), :acceptable_exit_codes => [0,2] + end end end #Perform a Puppet Enterprise upgrade or install # @param [Array<Host>] hosts The hosts to install or upgrade PE on