mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
indentation/syntax per new Ansible documentation
This commit is contained in:
parent
68a61805be
commit
9ac16ee093
1 changed files with 35 additions and 30 deletions
|
@ -1,57 +1,62 @@
|
||||||
# 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: Add a udev rule to transfer hwclock to system clock at dev creation
|
||||||
template: src=92-rtc-i2c.rules
|
template:
|
||||||
dest=/etc/udev/rules.d/92-rtc-i2c.rules
|
src: 92-rtc-i2c.rules
|
||||||
owner=root
|
dest: /etc/udev/rules.d/92-rtc-i2c.rules
|
||||||
group=root
|
owner: root
|
||||||
mode=0644
|
group: root
|
||||||
|
mode: 0644
|
||||||
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 needing to enable i2c rtc device in config.txt
|
||||||
lineinfile: dest=/boot/config.txt
|
lineinfile:
|
||||||
line="dtoverlay=i2c-rtc,{{ rtc_id }}=on"
|
dest: /boot/config.txt
|
||||||
state=present
|
line: "dtoverlay=i2c-rtc,{{ rtc_id }}=on"
|
||||||
|
state: present
|
||||||
register: rpiconfig
|
register: rpiconfig
|
||||||
when: rtc_id != "none"
|
when: rtc_id != "none"
|
||||||
|
|
||||||
|
|
||||||
- name: Add a udev rule to transfer hwclock to system clock at dev creation
|
- name: Add a udev rule to transfer hwclock to system clock at dev creation
|
||||||
template: src=92-rtc-i2c.rules
|
template:
|
||||||
dest=/etc/udev/rules.d/92-rtc-i2c.rules
|
src: 92-rtc-i2c.rules
|
||||||
owner=root
|
dest: /etc/udev/rules.d/92-rtc-i2c.rules
|
||||||
group=root
|
owner: root
|
||||||
mode=0644
|
group: root
|
||||||
|
mode: 0644
|
||||||
when: rtc_id != "none"
|
when: rtc_id != "none"
|
||||||
|
|
||||||
- name: Pre-install packages
|
- name: Pre-install packages
|
||||||
package: name={{ item }}
|
package:
|
||||||
state=latest
|
name: "{{ item }}"
|
||||||
|
state: latest
|
||||||
with_items:
|
with_items:
|
||||||
- ntp
|
- ntp
|
||||||
|
|
||||||
- name: Increase the swap file size (kalite pip download fails)
|
- name: Increase the swap file size, as kalite pip download fails (debuntu)
|
||||||
lineinfile: regexp="^CONF_SWAPSIZE"
|
lineinfile:
|
||||||
line=CONF_SWAPSIZE=500
|
regexp: "^CONF_SWAPSIZE"
|
||||||
dest=/etc/dphys-swapfile
|
line: CONF_SWAPSIZE=500
|
||||||
|
dest: /etc/dphys-swapfile
|
||||||
when: is_debuntu
|
when: is_debuntu
|
||||||
|
|
||||||
- name: Restart the swap service
|
- 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 service
|
||||||
template: src={{ item.src }}
|
template:
|
||||||
dest={{ item.dest }}
|
src: "{{ item.src }}"
|
||||||
owner=root
|
dest: "{{ item.dest }}"
|
||||||
group=root
|
owner: root
|
||||||
mode={{ item.mode }}
|
group: root
|
||||||
|
mode: "{{ item.mode }}"
|
||||||
with_items:
|
with_items:
|
||||||
- { 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 rootfs resizing service
|
||||||
service: name=iiab-rpi-root-resize
|
service:
|
||||||
enabled=yes
|
name: iiab-rpi-root-resize
|
||||||
|
enabled: yes
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue