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"
|
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/config.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: Install latest ntp package
|
||||||
package:
|
package:
|
||||||
|
@ -37,14 +34,14 @@
|
||||||
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?
|
when: is_raspbian | bool
|
||||||
|
|
||||||
- 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
|
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
|
- name: Install RPi rootfs resizing (iiab-rpi-max-rootfs.sh) and its systemd service (iiab-rpi-root-resize.service), from templates
|
||||||
template:
|
template:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue