mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
ubuntu mounts the first partition differently - limit swapfile mods to raspbian
This commit is contained in:
parent
fde51539c5
commit
5eaa5baf3b
1 changed files with 10 additions and 13 deletions
|
@ -10,22 +10,19 @@
|
|||
when: rtc_id is defined and rtc_id != "none"
|
||||
|
||||
# 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:
|
||||
path: /boot/config.txt
|
||||
line: "dtoverlay=i2c-rtc,{{ rtc_id }}=on"
|
||||
state: present
|
||||
register: rpiconfig # HMMM REGISTER "rpiconfig" IS *COMPLETELY UNUSED* AS OF 2018-11-02
|
||||
when: rtc_id is defined and rtc_id != "none"
|
||||
when: rtc_id is defined and rtc_id != "none" and is_raspbian
|
||||
|
||||
#- 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"
|
||||
# template:
|
||||
# src: 92-rtc-i2c.rules
|
||||
# dest: /etc/udev/rules.d/92-rtc-i2c.rules
|
||||
# owner: root
|
||||
# group: root
|
||||
# mode: 0644
|
||||
# when: 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
|
||||
lineinfile:
|
||||
path: /boot/firmware/config.txt
|
||||
line: "dtoverlay=i2c-rtc,{{ rtc_id }}=on"
|
||||
state: present
|
||||
when: rtc_id is defined and rtc_id != "none" and is_ubuntu
|
||||
|
||||
- name: Install latest ntp package
|
||||
package:
|
||||
|
@ -37,14 +34,14 @@
|
|||
path: /etc/dphys-swapfile
|
||||
regexp: "^CONF_SWAPSIZE"
|
||||
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?
|
||||
when: is_raspbian | bool
|
||||
|
||||
- name: Restart swap service "dphys-swapfile" (debuntu)
|
||||
#command: /etc/init.d/dphys-swapfile restart
|
||||
service: # A rare/legacy service that is NOT systemd
|
||||
name: dphys-swapfile
|
||||
state: restarted
|
||||
when: is_debuntu | bool
|
||||
when: is_raspbian | bool
|
||||
|
||||
- name: Install RPi rootfs resizing (iiab-rpi-max-rootfs.sh) and its systemd service (iiab-rpi-root-resize.service), from templates
|
||||
template:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue