1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-02-13 11:42:08 +00:00

Merge pull request #1280 from holta/ansible-output

1-prep Ansible output more readable & precise
This commit is contained in:
A Holt 2018-11-02 21:47:59 -04:00 committed by GitHub
commit ffbc818552
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 23 deletions

View file

@ -3,18 +3,18 @@
- name: ...IS BEGINNING ============================================
command: echo
- name: Install uuidgen program (debuntu)
- name: Install uuid-runtime package (debuntu)
package:
name: uuid-runtime
state: present
when: is_debuntu
- name: Test for /etc/iiab/uuid file
- name: Does /etc/iiab/uuid file exist?
stat:
path: /etc/iiab/uuid
register: uuid_file
- name: Create folder to hold uuid
- name: If not, create folder /etc/iiab
file:
path: /etc/iiab
state: directory
@ -25,15 +25,15 @@
register: uuid_response
when: not uuid_file.stat.exists
- name: Put the uuid in place
- name: Put uuid in place at /etc/iiab/uuid
shell: echo {{ uuid_response.stdout_lines[0] }} > /etc/iiab/uuid
when: not uuid_file.stat.exists
- name: Get the uuid
- name: Grab the uuid from /etc/iiab/uuid, into register stored_uuid
command: cat /etc/iiab/uuid
register: stored_uuid
- name: Get the value into a variable
- name: Place the uuid from register into variable/fact "uuid"
set_fact:
uuid: "{{ stored_uuid.stdout_lines[0] }}"
@ -56,7 +56,7 @@
tags: openvpn
# for rpi, without rtc, we need time as soon as possible
- name: Install chrony package
- name: Install chrony (an NTP package) especially for RPi's lacking RTC
package:
name: chrony
state: present
@ -64,11 +64,11 @@
- download
#TODO: Use regexp filter instead of hard-code ip
- name: Update chrony config file
- name: Install /etc/chrony.conf from template
template:
backup: no
dest: /etc/chrony.conf
src: chrony.conf.j2
dest: /etc/chrony.conf
backup: no
- name: Disable AppArmor -- override OS default (ubuntu)
service:
@ -93,12 +93,12 @@
- include_tasks: raspberry_pi.yml
when: first_run and rpi_model != "none"
- name: Check if the identifier for Intel's NUC6 builtin WiFi is present
- name: Check if the identifier for Intel's NUC6 built-in WiFi is present
shell: "lsusb | grep 8087:0a2b | wc | awk '{print $1}'"
register: usb_NUC6
ignore_errors: true
- name: Download the firmware for built-in WiFi on NUC6
- name: Download {{ iiab_download_url }}/iwlwifi-8000C-13.ucode to /lib/firmware for built-in WiFi on NUC6 # iiab_download_url is http://download.iiab.io/packages
get_url:
url: "{{ iiab_download_url }}/iwlwifi-8000C-13.ucode"
dest: /lib/firmware

View file

@ -1,6 +1,6 @@
# 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:
src: 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"
# 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:
dest: /boot/config.txt
line: "dtoverlay=i2c-rtc,{{ rtc_id }}=on"
state: present
register: rpiconfig
register: rpiconfig # HMMM REGISTER "rpiconfig" IS *COMPLETELY UNUSED* AS OF 2018-11-02
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:
src: 92-rtc-i2c.rules
dest: /etc/udev/rules.d/92-rtc-i2c.rules
@ -27,25 +27,23 @@
mode: 0644
when: rtc_id != "none"
- name: Pre-install packages
- name: Install latest ntp package
package:
name: "{{ item }}"
name: ntp
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:
regexp: "^CONF_SWAPSIZE"
line: CONF_SWAPSIZE=500
dest: /etc/dphys-swapfile
path: /etc/dphys-swapfile
when: is_debuntu
- name: Restart the swap service (debuntu)
command: /etc/init.d/dphys-swapfile restart
when: is_debuntu
- name: Add RPi rootfs resizing service
- name: Add RPi rootfs resizing systemd service
template:
src: "{{ item.src }}"
dest: "{{ item.dest }}"