mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Update raspberry_pi.yml
This commit is contained in:
parent
3fa7c8f76e
commit
5de384d64d
1 changed files with 21 additions and 18 deletions
|
@ -1,4 +1,4 @@
|
||||||
# Setup specific to the Raspberry Pi
|
# Specific to Raspberry Pi
|
||||||
|
|
||||||
- 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 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 is defined and rtc_id != "none"
|
||||||
template:
|
template:
|
||||||
|
@ -10,22 +10,22 @@
|
||||||
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: Check for need to enable i2c-rtc device in /boot/config.txt (requires reboot!)
|
- name: Enable i2c-rtc device (with "dtoverlay=i2c-rtc,{{ rtc_id }}=on" in /boot/config.txt) if rtc_id != "none" (requires reboot!)
|
||||||
lineinfile:
|
lineinfile:
|
||||||
dest: /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
|
register: rpiconfig # HMMM REGISTER "rpiconfig" IS *COMPLETELY UNUSED* AS OF 2018-11-02
|
||||||
when: rtc_id != "none"
|
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: 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:
|
# template:
|
||||||
src: 92-rtc-i2c.rules
|
# src: 92-rtc-i2c.rules
|
||||||
dest: /etc/udev/rules.d/92-rtc-i2c.rules
|
# dest: /etc/udev/rules.d/92-rtc-i2c.rules
|
||||||
owner: root
|
# owner: root
|
||||||
group: root
|
# group: root
|
||||||
mode: 0644
|
# mode: 0644
|
||||||
when: rtc_id != "none"
|
# when: rtc_id != "none"
|
||||||
|
|
||||||
- name: Install latest ntp package
|
- name: Install latest ntp package
|
||||||
package:
|
package:
|
||||||
|
@ -34,16 +34,19 @@
|
||||||
|
|
||||||
- name: Increase swap file size (to CONF_SWAPSIZE=500 in /etc/dphys-swapfile) as kalite pip download fails (debuntu)
|
- name: Increase swap file size (to CONF_SWAPSIZE=500 in /etc/dphys-swapfile) as kalite pip download fails (debuntu)
|
||||||
lineinfile:
|
lineinfile:
|
||||||
|
path: /etc/dphys-swapfile
|
||||||
regexp: "^CONF_SWAPSIZE"
|
regexp: "^CONF_SWAPSIZE"
|
||||||
line: CONF_SWAPSIZE=500
|
line: CONF_SWAPSIZE=500
|
||||||
path: /etc/dphys-swapfile
|
|
||||||
when: is_debuntu
|
when: is_debuntu
|
||||||
|
|
||||||
- name: Restart the swap service (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
|
||||||
|
name: dphys-swapfile
|
||||||
|
state: restarted
|
||||||
when: is_debuntu
|
when: is_debuntu
|
||||||
|
|
||||||
- name: Add RPi rootfs resizing systemd service
|
- name: Install RPi rootfs resizing (iiab-rpi-max-rootfs.sh) and its systemd service (iiab-rpi-root-resize.service), from templates
|
||||||
template:
|
template:
|
||||||
src: "{{ item.src }}"
|
src: "{{ item.src }}"
|
||||||
dest: "{{ item.dest }}"
|
dest: "{{ item.dest }}"
|
||||||
|
@ -54,7 +57,7 @@
|
||||||
- { src: 'iiab-rpi-max-rootfs.sh', dest: '/usr/sbin/iiab-rpi-max-rootfs.sh', mode: '0755'}
|
- { src: 'iiab-rpi-max-rootfs.sh', dest: '/usr/sbin/iiab-rpi-max-rootfs.sh', mode: '0755'}
|
||||||
- { src: 'iiab-rpi-root-resize.service', dest: '/etc/systemd/system/iiab-rpi-root-resize.service', mode: '0644'}
|
- { src: 'iiab-rpi-root-resize.service', dest: '/etc/systemd/system/iiab-rpi-root-resize.service', mode: '0644'}
|
||||||
|
|
||||||
- name: Enable rootfs resizing service
|
- name: Enable RPi rootfs resizing (systemd service iiab-rpi-root-resize.service)
|
||||||
service:
|
systemd:
|
||||||
name: iiab-rpi-root-resize
|
name: iiab-rpi-root-resize
|
||||||
enabled: yes
|
enabled: yes
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue