Project

General

Profile

Refactor #32063

Remove use-ntp parameter to simplify timezone set up

Added by Artur Obolewicz 4 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Low
Assignee:
-
Category:
Templates
Target version:
-
Difficulty:
trivial
Triaged:
No
Bugzilla link:
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.

Associated revisions

Revision 0e26f390 (diff)
Added by Artur Obolewicz 3 months ago

Fixes #32063 - remove use-ntp parameter from timezone command

Co-authored-by: Artur Obolewicz <>

History

#1 Updated by The Foreman Bot 4 months ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/8386 added

#2 Updated by The Foreman Bot 3 months ago

  • Fixed in Releases 2.5.0 added

#3 Updated by Anonymous 3 months ago

  • Status changed from Ready For Testing to Closed

Also available in: Atom PDF