1
0
Fork 0
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:
A Holt 2018-11-02 21:44:03 -04:00 committed by GitHub
parent a62eee1fdb
commit 0e27dc6b3a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,6 +1,6 @@
# Setup specific to the Raspberry Pi # Setup specific to the Raspberry Pi
- name: Add a udev rule to transfer hwclock to system clock at dev creation - 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:
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
@ -10,15 +10,15 @@
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 needing to enable i2c rtc device in config.txt - name: Check for need to enable i2c-rtc device in /boot/config.txt (requires reboot!)
lineinfile: lineinfile:
dest: /boot/config.txt dest: /boot/config.txt
line: "dtoverlay=i2c-rtc,{{ rtc_id }}=on" line: "dtoverlay=i2c-rtc,{{ rtc_id }}=on"
state: present state: present
register: rpiconfig register: rpiconfig # HMMM REGISTER "rpiconfig" IS *COMPLETELY UNUSED* AS OF 2018-11-02
when: rtc_id != "none" when: rtc_id != "none"
- name: Add a udev rule to transfer hwclock to system clock at dev creation - 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
@ -27,25 +27,23 @@
mode: 0644 mode: 0644
when: rtc_id != "none" when: rtc_id != "none"
- name: Pre-install packages - name: Install latest ntp package
package: package:
name: "{{ item }}" name: ntp
state: latest state: latest
with_items:
- ntp
- name: Increase the swap file size, 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:
regexp: "^CONF_SWAPSIZE" regexp: "^CONF_SWAPSIZE"
line: CONF_SWAPSIZE=500 line: CONF_SWAPSIZE=500
dest: /etc/dphys-swapfile path: /etc/dphys-swapfile
when: is_debuntu when: is_debuntu
- name: Restart the swap service (debuntu) - name: Restart the swap service (debuntu)
command: /etc/init.d/dphys-swapfile restart command: /etc/init.d/dphys-swapfile restart
when: is_debuntu when: is_debuntu
- name: Add RPi rootfs resizing service - name: Add RPi rootfs resizing systemd service
template: template:
src: "{{ item.src }}" src: "{{ item.src }}"
dest: "{{ item.dest }}" dest: "{{ item.dest }}"