pi: enable GPSD
Signed-off-by: Frank Villaro-Dixon <frank@villaro-dixon.eu>
This commit is contained in:
parent
9b92ab7735
commit
94371b781a
2 changed files with 35 additions and 0 deletions
|
@ -55,6 +55,37 @@
|
||||||
line: "dtoverlay=pps-gpio,gpiopin=18"
|
line: "dtoverlay=pps-gpio,gpiopin=18"
|
||||||
state: present
|
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
4
ansible/files/gpsd
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
START_DAEMON="true"
|
||||||
|
USBAUTO="true"
|
||||||
|
DEVICES="/dev/ttyS0"
|
||||||
|
GPSD_OPTIONS="-n"
|
Loading…
Reference in a new issue