diff --git a/files/chrony/chrony.conf.j2 b/files/chrony/chrony.conf similarity index 100% rename from files/chrony/chrony.conf.j2 rename to files/chrony/chrony.conf diff --git a/files/chrony/chronyd b/files/chrony/chronyd new file mode 100644 index 0000000..a65c001 --- /dev/null +++ b/files/chrony/chronyd @@ -0,0 +1,2 @@ +# Command-line options for chronyd +OPTIONS="-4 -F 2" \ No newline at end of file diff --git a/playbook-chrony.yml b/playbook-chrony.yml index 5b867d0..bdcc155 100644 --- a/playbook-chrony.yml +++ b/playbook-chrony.yml @@ -8,15 +8,18 @@ state: present - name: config time server - template: - src: chrony/chrony.conf.j2 + copy: + src: chrony/chrony.conf dest: /etc/chrony.conf - name: disable chrony ipv6 - replace: - path: /etc/sysconfig/chronyd - regexp: '^OPTIONS=""' - replace: 'OPTIONS="-4"' + copy: + src: chrony/chronyd + dest: /etc/sysconfig/chronyd + #replace: + # path: /etc/sysconfig/chronyd + # regexp: '^OPTIONS=""' + # replace: 'OPTIONS="-4"' - name: start and active service chronyd systemd: