library/ipadiscovery: Add time synchronization calls

Attempt to sync time if on_master is not set and no_ntp is not set: At
first with given or dicovered time servers. If no ntp servers have been
given or discovered, then with the ipa server.

New parameters:
  on_master:
    description: IPA client installation on IPA server
    required: false
    default: false
    type: bool
    default: no
  ntp_servers:
    description: List of NTP servers to use
    required: false
    type: list
    default: []
  no_ntp:
    description: Do not sync time and do not detect time servers
    required: false
    default: false
    type: bool
    default: no

The ntp_servers output parameter is now always an empty list if on_master
or no_ntp is set.
This commit is contained in:
Thomas Woerner
2017-12-06 12:53:19 +01:00
parent 120786672e
commit d009b80621
3 changed files with 53 additions and 4 deletions

View File

@@ -18,6 +18,9 @@
realm: "{{ ipaclient_realm | default(omit) }}"
hostname: "{{ ipaclient_hostname | default(ansible_fqdn) }}"
ca_cert_file: "{{ ipaclient_ca_cert_file | default(omit) }}"
on_master: "{{ ipaclient_on_master }}"
ntp_servers: "{{ ipaclient_ntp_servers | default([]) }}"
no_ntp: "{{ ipaclient_no_ntp }}"
register: ipadiscovery
- name: Install - Set default principal if no keytab is given