Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #38173 - Permit use of arrays for multiple timesources #10427

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ description: |
- enable-official-puppet8-repo: boolean (default=false)
- skip-puppet-setup: boolean (default=false)
- salt_master: string (default=undef)
- ntp-server: string (default=undef)
- ntp-server: string (default=undef), an array is permitted for multiple servers
- bootloader-append: string (default="nofb quiet splash=quiet")
- disable-firewall: boolean (default=false)
- package_upgrade: boolean (default=true)
Expand Down Expand Up @@ -142,13 +142,27 @@ authselect --useshadow --passalgo=<%= @host.operatingsystem.password_hash.downca
authconfig --useshadow --passalgo=<%= @host.operatingsystem.password_hash.downcase || 'sha256' %> --kickstart
<% end -%>
<% if rhel_compatible && os_major < 9 -%>
timezone --utc <%= host_param('time-zone') || 'UTC' %> <%= host_param('ntp-server') ? "--ntpservers #{host_param('ntp-server')}" : '' %>
<% if host_param('ntp-server') -%>
<% if host_param('ntp-server').is_a?(Array) -%>
timezone --utc <%= host_param('time-zone') || 'UTC' %> --ntpservers <%= host_param('ntp-server').join(',') %>
<% else %>
timezone --utc <%= host_param('time-zone') || 'UTC' %> --ntpservers <%= host_param('ntp-server') %>
<% end -%>
<% else -%>
timezone --utc <%= host_param('time-zone') || 'UTC' %>
<% end -%>
<% else -%>
timezone --utc <%= host_param('time-zone') || 'UTC' %>
<% if host_param('ntp-server') -%>
<% if host_param('ntp-server').is_a?(Array) -%>
<% host_param('ntp-server').each do |ntpserver| -%>
timesource --ntp-server <%= ntpserver %>
<% end -%>
<% else -%>
timesource --ntp-server <%= host_param('ntp-server') %>
<% end -%>
<% end -%>
<% end -%>

<% if rhel_compatible -%>
services --disabled gpm,sendmail,cups,pcmcia,isdn,rawdevices,hpoj,bluetooth,openibd,avahi-daemon,avahi-dnsconfd,hidd,hplip,pcscd
Expand Down
Loading