mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
VMware: remove blank from ntp server list (#44273)
Due to blank line returned from vCenter, wrong values were appended to NTP server list. This fix adds filter for such blank values of NTP servers. Fixes: #44183 Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
parent
57497a490b
commit
39e2bd01a6
1 changed files with 1 additions and 0 deletions
|
@ -118,6 +118,7 @@ class VmwareNtpConfigManager(PyVmomi):
|
|||
host_date_time_manager = host.configManager.dateTimeSystem
|
||||
if host_date_time_manager:
|
||||
available_ntp_servers = host_date_time_manager.dateTimeInfo.ntpConfig.server
|
||||
available_ntp_servers = list(filter(None, available_ntp_servers))
|
||||
if operation == 'add':
|
||||
available_ntp_servers = available_ntp_servers + ntp_servers
|
||||
elif operation == 'delete':
|
||||
|
|
Loading…
Reference in a new issue