diff --git a/ansible/configure-server.yml b/ansible/configure-server.yml index a0b8c08..0d24c49 100644 --- a/ansible/configure-server.yml +++ b/ansible/configure-server.yml @@ -2,6 +2,7 @@ - hosts: pi gather_facts: no tasks: + ## LCD STUFF - name: Enable i2c on boot/config.txt lineinfile: dest: /boot/config.txt @@ -41,11 +42,23 @@ state: started tags: display + ## Now the most important part: PPS + - name: Add PPS tools + package: + name: pps-tools + state: present + + - name: PPS on GPIO + lineinfile: + dest: /boot/config.txt + regexp: "^dtoverlay=pps-gpio" + line: "dtoverlay=pps-gpio,gpiopin=18" + state: present + - hosts: all - gather_facts: no tasks: # - name: Install chrony # package: diff --git a/ansible/files/chrony.conf.j2 b/ansible/files/chrony.conf.j2 index 49ecf33..ae2f71f 100644 --- a/ansible/files/chrony.conf.j2 +++ b/ansible/files/chrony.conf.j2 @@ -33,7 +33,11 @@ pool pool.ntp.infomaniak.ch iburst pool 2.arch.pool.ntp.org iburst - + +{% if ansible_hostname == "chronos" %} +refclock PPS /dev/pps0 refid PPS +{% endif %} + ####################################################################### ### AVOIDING POTENTIALLY BOGUS CHANGES TO YOUR CLOCK #