mirror of
https://github.com/iiab/iiab.git
synced 2025-02-15 04:32:11 +00:00
* move reboot early in install process for rpi9 only * sed regular expression, add space above message * has awk but not gawk * add in download of wifi driver - raspbian-9
69 lines
2.2 KiB
YAML
69 lines
2.2 KiB
YAML
# Setup specific to the Raspberry Pi
|
|
#
|
|
- name: Add a udev rule to transfer hwclock to system clock at dev creation
|
|
template: src=92-rtc-i2c.rules
|
|
dest=/etc/udev/rules.d/92-rtc-i2c.rules
|
|
owner=root
|
|
group=root
|
|
mode=0644
|
|
when: rtc_id is defined and rtc_id != "none"
|
|
|
|
#
|
|
# RTC requires a change to the device tree (and reboot)
|
|
- name: Check for needing to enable i2c rtc device in config.txt
|
|
lineinfile: dest=/boot/config.txt
|
|
line="dtoverlay=i2c-rtc,{{ rtc_id }}=on"
|
|
state=present
|
|
register: rpiconfig
|
|
when: rtc_id != "none"
|
|
|
|
|
|
- name: Add a udev rule to transfer hwclock to system clock at dev creation
|
|
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: pre-Install packages
|
|
package: name={{ item }}
|
|
state=latest
|
|
with_items:
|
|
- ntp
|
|
|
|
- name: disable the renaming of eth0
|
|
shell: sed -i -e 's/deadline fsck/deadline net.ifnames=0 fsck/' /boot/cmdline.txt
|
|
|
|
- name: increase the swap file size (kalite pip download fails)
|
|
lineinfile: regexp="^CONF_SWAPSIZE"
|
|
line=CONF_SWAPSIZE=500
|
|
dest=/etc/dphys-swapfile
|
|
when: is_debuntu
|
|
|
|
- name: restart the swap service
|
|
command: /etc/init.d/dphys-swapfile restart
|
|
when: is_debuntu
|
|
|
|
- name: Add rpi rootfs resizing service
|
|
template: src={{ item.src }}
|
|
dest={{ item.dest }}
|
|
owner=root
|
|
group=root
|
|
mode={{ item.mode }}
|
|
with_items:
|
|
- { 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'}
|
|
|
|
- name: Enable rootfs resizing service
|
|
service: name=iiab-rpi-root-resize
|
|
enabled=yes
|
|
|
|
- name: substitute jessie wifi driver on raspbian-9 workaround
|
|
get_url: url={{ iiab_download_url }}/{{ item }}
|
|
dest=/lib/firmware/brcm/
|
|
force=yes
|
|
with_items:
|
|
- brcmfmac43430-sdio.bin
|
|
- brcmfmac43430-sdio.txt
|
|
when: ansible_local.local_facts.os_ver == "raspbian-9"
|