Bug #32725
closedkatello-change-hostname should handle --no-enable-puppet properly
Description
Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1967974
Description of problem:
katello-change-hostname will error out if @scenario_answers['puppet'] is false (https://github.com/theforeman/foreman-packaging/blob/rpm/1.24/packages/katello/katello/hostname-change.rb#L170). We should skip `delete_puppet_certs` if this is the case.
Version-Release number of selected component (if applicable):
Katello 3.14
How reproducible:
Always
Steps to Reproduce:
1. Remove the puppet configuration from katello-answers.yaml
2. Run katello-change-hostname
3.
Actual results:
deleting old certs
/usr/share/katello/hostname-change.rb:217:in `delete_puppet_certs': undefined method `[]' for nil:NilClass (NoMethodError)
from /usr/share/katello/hostname-change.rb:488:in `run'
from /sbin/katello-change-hostname:23:in `<main>'
Expected results:
hostname changed successfully
Additional info: