Modify kickstart templates to update the /etc/hosts and /etc/resolv.conf
|Status:||Ready For Testing|
|Assigned To:||Marek Hulán|
|Target version:||Team Marek backlog|
|Found in release:||Pull request:||https://github.com/theforeman/community-templates/pull/361|
|Velocity based estimate||-|
Description of problem:
Default kicstart finish templates are not updating the /etc/hosts and /etc/resolv.conf files. This creates additional useless effort to configure the host later via puppet or any other configuration management tool.
Version-Release number of selected component (if applicable):
All foreman releases
- Provision a new host with static IPs
- Check if the /etc/hosts file contains the hostname and the IP of the new server (it's not)
- Check if the /etc/resolv.conf is populated.
/etc/hosts should be updated with the IP, hostname and short hostname of the new server if the IP is static.
/etc/resolv.conf should contain the DNS servers set during provisioning time.
Foreman has all the necessary information to do so, and there is no reason to write custom snippets to do that.