mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-07-31 20:04:45 +00:00
ipaclient: Support sync_time changes of 4.8.0
sync_time is not using options anymore, but has two new arguments. These are ntp_servers and ntp_pool. The options argument is not used anymore. This requires to use inspect on sync_time to be able to detect if the old or the new function is available. The call for get_time_source has been added, but is documented out as the call is only useful in interactive mode. ipaclient_test now returns ntp_servers and ntp_pool, which are then used for ipaclient_setup_ntp.
This commit is contained in:
@@ -124,7 +124,12 @@ def main():
|
||||
if sync_time is not None:
|
||||
if options.conf_ntp:
|
||||
# Attempt to configure and sync time with NTP server (chrony).
|
||||
synced_ntp = sync_time(options, fstore, statestore)
|
||||
argspec = inspect.getargspec(sync_time)
|
||||
if "options" not in argspec.args:
|
||||
synced_ntp = sync_time(options.ntp_servers, options.ntp_pool,
|
||||
fstore, statestore)
|
||||
else:
|
||||
synced_ntp = sync_time(options, fstore, statestore)
|
||||
elif options.on_master:
|
||||
# If we're on master skipping the time sync here because it was done
|
||||
# in ipa-server-install
|
||||
|
||||
Reference in New Issue
Block a user