# platform = multi_platform_all
# reboot = false
# strategy = enable
# complexity = low
# disruption = low

- (xccdf-var var_timesync_service)


- name: Enable service systemd-timesyncd
  block:
  - name: Gather the package facts
    ansible.builtin.package_facts:
      manager: auto
  - name: Enable service systemd-timesyncd
    ansible.builtin.systemd:
      name: "systemd-timesyncd"
      enabled: "yes"
      state: "started"
      masked: "no"
    when:
    - '"systemd-timesyncd" in ansible_facts.packages'
    - var_timesync_service == "systemd-timesyncd"

    - var_timesync_service == "systemd-timesyncd"
