mirror of
https://github.com/iiab/iiab.git
synced 2025-02-15 04:32:11 +00:00
commit
d05cf41731
3 changed files with 23 additions and 30 deletions
|
@ -18,7 +18,7 @@ exFAT_enabled: False
|
||||||
is_F18: False
|
is_F18: False
|
||||||
|
|
||||||
# Set default 1-prep discovered hardware
|
# Set default 1-prep discovered hardware
|
||||||
rtc_id: ds3231
|
rtc_id: none
|
||||||
NUC6_firmware_needed: False
|
NUC6_firmware_needed: False
|
||||||
|
|
||||||
# Used in 2-common/tasks/xo.yml
|
# Used in 2-common/tasks/xo.yml
|
||||||
|
|
|
@ -77,19 +77,6 @@
|
||||||
name: openvpn
|
name: openvpn
|
||||||
when: openvpn_install | bool
|
when: openvpn_install | bool
|
||||||
|
|
||||||
# for rpi, without rtc, we need time as soon as possible
|
|
||||||
- name: Install chrony (an NTP package) especially for RPi's lacking RTC
|
|
||||||
package:
|
|
||||||
name: chrony
|
|
||||||
state: present
|
|
||||||
|
|
||||||
#TODO: Use regexp filter instead of hard-code ip
|
|
||||||
- name: Install /etc/chrony.conf from template
|
|
||||||
template:
|
|
||||||
src: chrony.conf.j2
|
|
||||||
dest: /etc/chrony.conf
|
|
||||||
backup: no
|
|
||||||
|
|
||||||
# Debian 10 "Buster" is apparently enabling AppArmor in 2019:
|
# Debian 10 "Buster" is apparently enabling AppArmor in 2019:
|
||||||
# https://wiki.debian.org/AppArmor/Progress
|
# https://wiki.debian.org/AppArmor/Progress
|
||||||
# https://wiki.debian.org/AppArmor/HowToUse
|
# https://wiki.debian.org/AppArmor/HowToUse
|
||||||
|
|
|
@ -10,41 +10,47 @@
|
||||||
when: rtc_id is defined and rtc_id != "none"
|
when: rtc_id is defined and rtc_id != "none"
|
||||||
|
|
||||||
# RTC requires a change to the device tree (and reboot)
|
# RTC requires a change to the device tree (and reboot)
|
||||||
- name: Enable i2c-rtc device (with "dtoverlay=i2c-rtc,{{ rtc_id }}=on" in /boot/config.txt, requires reboot!) if rtc_id is defined and rtc_id != "none"
|
- name: Enable i2c-rtc device (with "dtoverlay=i2c-rtc,{{ rtc_id }}=on" in /boot/config.txt, requires reboot!) if rtc_id is defined and rtc_id != "none" and is_raspbian
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /boot/config.txt
|
path: /boot/config.txt
|
||||||
line: "dtoverlay=i2c-rtc,{{ rtc_id }}=on"
|
line: "dtoverlay=i2c-rtc,{{ rtc_id }}=on"
|
||||||
state: present
|
state: present
|
||||||
register: rpiconfig # HMMM REGISTER "rpiconfig" IS *COMPLETELY UNUSED* AS OF 2018-11-02
|
when: rtc_id is defined and rtc_id != "none" and is_raspbian
|
||||||
when: rtc_id is defined and rtc_id != "none"
|
|
||||||
|
|
||||||
#- name: Install udev rule /etc/udev/rules.d/92-rtc-i2c.rules from template, to transfer hwclock to system clock at dev creation, if rtc_id != "none"
|
- name: Enable i2c-rtc device (with "dtoverlay=i2c-rtc,{{ rtc_id }}=on" in /boot/firmware/config.txt, requires reboot!) if rtc_id is defined and rtc_id != "none" and is_ubuntu
|
||||||
# template:
|
lineinfile:
|
||||||
# src: 92-rtc-i2c.rules
|
path: /boot/firmware/usercfg.txt
|
||||||
# dest: /etc/udev/rules.d/92-rtc-i2c.rules
|
line: "dtoverlay=i2c-rtc,{{ rtc_id }}=on"
|
||||||
# owner: root
|
state: present
|
||||||
# group: root
|
when: rtc_id is defined and rtc_id != "none" and is_ubuntu
|
||||||
# mode: 0644
|
|
||||||
# when: rtc_id != "none"
|
|
||||||
|
|
||||||
- name: Install latest ntp package
|
- name: Enable bluetooth in /boot/firmware/syscfg.txt on Ubuntu (needs reboot)
|
||||||
|
lineinfile:
|
||||||
|
path: /boot/firmware/syscfg.txt
|
||||||
|
regexp: '^include*'
|
||||||
|
line: 'include btcfg.txt'
|
||||||
|
when: is_ubuntu
|
||||||
|
|
||||||
|
- name: Ensure dphys-swapfile fake-hwclock iw rkill are installed
|
||||||
package:
|
package:
|
||||||
name: ntp
|
name:
|
||||||
state: latest
|
- dphys-swapfile
|
||||||
|
- fake-hwclock
|
||||||
|
- iw
|
||||||
|
- rfkill
|
||||||
|
state: present
|
||||||
|
|
||||||
- name: Increase swap file size (to CONF_SWAPSIZE={{ pi_swap_file_size }} in /etc/dphys-swapfile) as kalite pip download fails (debuntu)
|
- name: Increase swap file size (to CONF_SWAPSIZE={{ pi_swap_file_size }} in /etc/dphys-swapfile) as kalite pip download fails (debuntu)
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: /etc/dphys-swapfile
|
path: /etc/dphys-swapfile
|
||||||
regexp: "^CONF_SWAPSIZE"
|
regexp: "^CONF_SWAPSIZE"
|
||||||
line: "CONF_SWAPSIZE={{ pi_swap_file_size }}"
|
line: "CONF_SWAPSIZE={{ pi_swap_file_size }}"
|
||||||
when: is_debuntu | bool # Redundant, given raspberry_pi.yml is only run when rpi_model: != "none" Until someone tries a non-debuntu OS on RPi?
|
|
||||||
|
|
||||||
- name: Restart swap service "dphys-swapfile" (debuntu)
|
- name: Restart swap service "dphys-swapfile" (debuntu)
|
||||||
#command: /etc/init.d/dphys-swapfile restart
|
#command: /etc/init.d/dphys-swapfile restart
|
||||||
service: # A rare/legacy service that is NOT systemd
|
service: # A rare/legacy service that is NOT systemd
|
||||||
name: dphys-swapfile
|
name: dphys-swapfile
|
||||||
state: restarted
|
state: restarted
|
||||||
when: is_debuntu | bool
|
|
||||||
|
|
||||||
- name: Install RPi rootfs resizing (iiab-rpi-max-rootfs.sh) and its systemd service (iiab-rpi-root-resize.service), from templates
|
- name: Install RPi rootfs resizing (iiab-rpi-max-rootfs.sh) and its systemd service (iiab-rpi-root-resize.service), from templates
|
||||||
template:
|
template:
|
||||||
|
|
Loading…
Reference in a new issue