pi: enable GPSD

Signed-off-by: Frank Villaro-Dixon <frank@villaro-dixon.eu>
This commit is contained in:
Frank Villaro-Dixon 2024-06-17 14:00:30 +02:00
parent 9b92ab7735
commit 94371b781a
2 changed files with 35 additions and 0 deletions

View file

@ -55,6 +55,37 @@
line: "dtoverlay=pps-gpio,gpiopin=18"
state: present
## Enable UART for the GPS module
- name: Enable UART
lineinfile:
dest: /boot/config.txt
regexp: "^#?enable_uart="
line: "enable_uart=1"
insertafter: EOF
state: present
- name: Disable serial-getty@ttyS0
systemd:
name: serial-getty@ttyS0
enabled: no
state: stopped
- name: copy gpsd config files
ansible.builtin.copy:
src: files/gpsd
dest: /etc/default/gpsd
owner: root
group: root
mode: 0644
tags: gpsd
- name: start and enable gpsd
systemd:
name: gpsd
enabled: yes
state: started
tags: gpsd

4
ansible/files/gpsd Normal file
View file

@ -0,0 +1,4 @@
START_DAEMON="true"
USBAUTO="true"
DEVICES="/dev/ttyS0"
GPSD_OPTIONS="-n"