Refactor #32063
closedRemove use-ntp parameter to simplify timezone set up
Description
The "Kickstart default" accept "use-ntp" parameter to support the ability to disable NTP and use Chrony. "use-ntp" parameter is also used to define "ntp-server" in "timezone" command which is doubling the same code currently. If use-ntp=false it uses the same timezone options as use-ntp=true
1. use-ntp=true
1.a. host_param('time-zone') is provided:
timezone --utc time-zone
1.b. host_param('time-zone') is not provided:
timezone --utc UTC
2. use-ntp=false
2.a. host_param('time-zone') is provided:
timezone --utc time-zone -> the same as 1.a.
2.b. host_param('time-zone') is not provided:
timezone --utc UTC -> the same as 1.b.
2.c. host_param('time-zone') is not provided and host_param('ntp-server') is provided:
timezone --utc UTC --ntpservers ntp-server
2.d. host_param('time-zone') is provided and host_param('ntp-server') is provided:
timezone --utc time-zone --ntpservers ntp-server
It is possible to remove one if/else conditional from the template and simplify it.
Updated by The Foreman Bot over 3 years ago
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman/pull/8386 added
Updated by Anonymous over 3 years ago
- Status changed from Ready For Testing to Closed
Applied in changeset foreman|0e26f390846ea7b6cf4799620848b8dac07e0b3b.