Project

General

Profile

Actions

Refactor #32063

closed

Remove use-ntp parameter to simplify timezone set up

Added by Artur Obolewicz over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
Templates
Target version:
-
Difficulty:
trivial
Triaged:
No
Fixed in Releases:
Found in Releases:

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.

Actions #1

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
Actions #2

Updated by The Foreman Bot over 3 years ago

  • Fixed in Releases 2.5.0 added
Actions #3

Updated by Anonymous over 3 years ago

  • Status changed from Ready For Testing to Closed
Actions

Also available in: Atom PDF