mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 03:32:12 +00:00
* change apache_data to apache_user in all * no libapach2 in centos. just php. no php-magick in centos * remove redundant vars entries * do not create apache user * missed one pound sign * soft code all references to apache_user * centos requires older setuptools * revert ansible_lsb.id in xsce.yml * try getting recent pip * move pip download to 2prep so that kalite success is not dependent on iiab coming first * still need to replace setuptools in kalite * add curl -- needed in debian * massivly substitue iiab for xsce, and rename files * completed runansible * centos fixes,install pip * appliance means no iptables rules * change to earlier version of setuptools for centos * delete file duplicate, hopefully unnecessary. generate the offline docs * wiki docs errors * create the admin group -- deleted earlier * use the --yes option with pip uninstall * base of repo moved from schoolserver to iiab, unleashkids.org->iiab.io * network detection broken due to tupo
62 lines
1.8 KiB
YAML
62 lines
1.8 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: 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 swqp 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: Reboot if the config.txt was changed
|
|
command: /sbin/reboot
|
|
when: rpiconfig.changed
|
|
async: 300
|
|
poll: 120
|