Project

General

Profile

Actions

Feature #19933

open

changing the hostname code repetition in foreman-answers.yaml

Added by Han Boetes over 7 years ago. Updated over 7 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
foreman-installer script
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

foreman installation depend heavily on being able to rerun the foreman-installer after problems. This all goes fine until someone decides to change the hostname. I wasn't aware of the file foreman-answers.yaml and thus ran into a lot of unexpected problems.

So I would like to suggest to:
  • change foreman01.example.com to (pseudocode) $fqdn in the template
  • change foreman01 to $hostname
  • Provide an option in the installer to change the hostname.
  • Document host to perform hostname changes and warn that puppet keys need to be replaced.
# grep foreman01 /etc/foreman-installer/scenarios.d/foreman-answers.yaml
3:  foreman_url: https://foreman01.example.com
12:  servername: foreman01.example.com
52:  server_ssl_cert: "/etc/puppetlabs/puppet/ssl/certs/foreman01.example.com.pem" 
54:  server_ssl_key: "/etc/puppetlabs/puppet/ssl/private_keys/foreman01.example.com.pem" 
57:  client_ssl_cert: "/etc/puppetlabs/puppet/ssl/certs/foreman01.example.com.pem" 
58:  client_ssl_key: "/etc/puppetlabs/puppet/ssl/private_keys/foreman01.example.com.pem" 
81:  websockets_ssl_key: "/etc/puppetlabs/puppet/ssl/private_keys/foreman01.example.com.pem" 
82:  websockets_ssl_cert: "/etc/puppetlabs/puppet/ssl/certs/foreman01.example.com.pem" 
127:  ssl_cert: "/etc/puppetlabs/puppet/ssl/certs/foreman01.example.com.pem" 
128:  ssl_key: "/etc/puppetlabs/puppet/ssl/private_keys/foreman01.example.com.pem" 
133:  - foreman01.example.com
159:  puppet_url: https://foreman01.example.com:8140
161:  puppet_ssl_cert: "/etc/puppetlabs/puppet/ssl/certs/foreman01.example.com.pem" 
162:  puppet_ssl_key: "/etc/puppetlabs/puppet/ssl/private_keys/foreman01.example.com.pem" 
167:  template_url: http://foreman01.example.com:8000
222:  dns_tsig_principal: foremanproxy/foreman01@FOREMAN
240:  foreman_base_url: https://foreman01.example.com
241:  registered_name: foreman01.example.com
308:  client_certname: foreman01.example.com
309:  puppetmaster: foreman01.example.com
317:  - foreman01.example.com
329:  - foreman01.example.com
395:  server_certname: foreman01.example.com
404:  server_foreman_url: https://foreman01.example.com

Related issues 1 (0 open1 closed)

Related to Katello - Feature #17522: Need a server side tool to assist with the process of changing the hostname of the Katello serverClosedJohn Mitsch11/29/2016Actions
Actions #1

Updated by Daniel Lobato Garcia over 7 years ago

  • Tracker changed from Bug to Feature

There is http://projects.theforeman.org/issues/17522 which does this for Katello, I'm guessing the script can be adapted to be used with plain Foreman too (https://github.com/Katello/katello-packaging/pull/323/files)

Actions #2

Updated by Daniel Lobato Garcia over 7 years ago

  • Related to Feature #17522: Need a server side tool to assist with the process of changing the hostname of the Katello server added
Actions #3

Updated by Han Boetes over 7 years ago

Looks like a start indeed. Perhaps a stern warning that all certificates are going to be invalid also those on depending hosts. So quite a bit of work is involved.

Actions #4

Updated by Han Boetes over 7 years ago

  • Subject changed from chaning the hostname code repetition in foreman-answers.yaml to changing the hostname code repetition in foreman-answers.yaml
Actions

Also available in: Atom PDF