diff --git a/tasks/configure_ntp.yml b/tasks/configure_ntp.yml index a9b6294d82ff25f2886c3d0654dd7b6faaba3ee4..f344ec8e1ca01ebf13d03d5e31cfaebd48926234 100644 --- a/tasks/configure_ntp.yml +++ b/tasks/configure_ntp.yml @@ -1,10 +1,6 @@ --- # copy module modifies parent directory permissions, when file or directory is copied with owner and group different than root. It is also not idempotent and changes on subsequent runs. - name: configure NTP - ansible.builtin.copy: - src: "etc/ntp.conf" - dest: "/etc/ntp.conf" - owner: "root" - group: "root" - mode: "0644" - tags: [molecule-idempotence-notest] + ansible.builtin.file: + path: "/etc/ntp.conf" + state: absent diff --git a/tasks/main.yml b/tasks/main.yml index ada2ad387cb8d081317800703e74ce1e56d7c196..5a005a4ab6802a4f1fc3d772266abe955d92ce56 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -146,7 +146,6 @@ - name: NTP konfigurieren import_tasks: configure_ntp.yml - when: ansible_os_family == "RedHat" tags: [ntp] # there's no way to get this task to become idempotent, so we have to skip the test diff --git a/tasks/migrate_ntpd_to_esxi_timesync.yml b/tasks/migrate_ntpd_to_esxi_timesync.yml index a9df01be70655b1aac71e7784e93ecf03b1528a7..e9ab4d2f5a027418ff77779c366bd4b4a547cbbf 100644 --- a/tasks/migrate_ntpd_to_esxi_timesync.yml +++ b/tasks/migrate_ntpd_to_esxi_timesync.yml @@ -1,6 +1,6 @@ --- - name: purge NTPd package - ansible.builtin.apt: + ansible.builtin.package: name: "ntp" state: absent