mirror of
https://github.com/iiab/iiab.git
synced 2025-02-13 11:42:08 +00:00
Update main.yml
This commit is contained in:
parent
4ad1d22d88
commit
67c0b11133
1 changed files with 34 additions and 21 deletions
|
@ -4,16 +4,20 @@
|
||||||
command: echo
|
command: echo
|
||||||
|
|
||||||
- name: Get the uuidgen program
|
- name: Get the uuidgen program
|
||||||
package: name=uuid-runtime
|
package:
|
||||||
state=present
|
name: uuid-runtime
|
||||||
|
state: present
|
||||||
when: is_debuntu
|
when: is_debuntu
|
||||||
|
|
||||||
- name: Test for /etc/iiab/uuid file
|
- name: Test for /etc/iiab/uuid file
|
||||||
stat: path=/etc/iiab/uuid
|
stat:
|
||||||
|
path: /etc/iiab/uuid
|
||||||
register: uuid_file
|
register: uuid_file
|
||||||
|
|
||||||
- name: Create folder to hold uuid
|
- name: Create folder to hold uuid
|
||||||
file: path=/etc/iiab state=directory
|
file:
|
||||||
|
path: /etc/iiab
|
||||||
|
state: directory
|
||||||
when: not uuid_file.stat.exists
|
when: not uuid_file.stat.exists
|
||||||
|
|
||||||
- name: If no uuid exists, create one
|
- name: If no uuid exists, create one
|
||||||
|
@ -31,12 +35,13 @@
|
||||||
|
|
||||||
- name: Get the value into a variable
|
- name: Get the value into a variable
|
||||||
set_fact:
|
set_fact:
|
||||||
uuid={{ stored_uuid.stdout_lines[0] }}
|
uuid: "{{ stored_uuid.stdout_lines[0] }}"
|
||||||
|
|
||||||
# for rpi, without rtc, we need time as soon as possible
|
# for rpi, without rtc, we need time as soon as possible
|
||||||
- name: Install chrony package
|
- name: Install chrony package
|
||||||
package: name={{ item }}
|
package:
|
||||||
state=present
|
name: "{{ item }}"
|
||||||
|
state: present
|
||||||
with_items:
|
with_items:
|
||||||
- chrony
|
- chrony
|
||||||
tags:
|
tags:
|
||||||
|
@ -44,17 +49,22 @@
|
||||||
|
|
||||||
#TODO: Use regexp filter instead of hard-code ip
|
#TODO: Use regexp filter instead of hard-code ip
|
||||||
- name: Update chrony config file
|
- name: Update chrony config file
|
||||||
template: backup=no
|
template:
|
||||||
dest=/etc/chrony.conf
|
backup: no
|
||||||
src=chrony.conf.j2
|
dest: /etc/chrony.conf
|
||||||
|
src: chrony.conf.j2
|
||||||
|
|
||||||
- name: Disable AppArmor -- on by default in Ubuntu
|
- name: Disable AppArmor -- on by default in Ubuntu
|
||||||
service: name=apparmor enabled=False state=stopped
|
service:
|
||||||
|
name: apparmor
|
||||||
|
enabled: False
|
||||||
|
state: stopped
|
||||||
when: is_ubuntu
|
when: is_ubuntu
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
- name: Disable SELinux on next boot
|
- name: Disable SELinux on next boot
|
||||||
selinux: state=disabled
|
selinux:
|
||||||
|
state: disabled
|
||||||
register: selinux_disabled
|
register: selinux_disabled
|
||||||
when: not is_debuntu
|
when: not is_debuntu
|
||||||
|
|
||||||
|
@ -68,19 +78,22 @@
|
||||||
when: first_run and rpi_model != "none"
|
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 builtin WiFi is present
|
||||||
shell: "lsusb | grep 8087:0a2b | wc |awk '{print $1}'"
|
shell: "lsusb | grep 8087:0a2b | wc | awk '{print $1}'"
|
||||||
register: usb_NUC6
|
register: usb_NUC6
|
||||||
ignore_errors: true
|
ignore_errors: true
|
||||||
|
|
||||||
- name: Download the firmware for built-in WiFi on NUC6
|
- name: Download the firmware for built-in WiFi on NUC6
|
||||||
get_url: dest=/lib/firmware
|
get_url:
|
||||||
url={{ iiab_download_url }}/iwlwifi-8000C-13.ucode
|
dest: /lib/firmware
|
||||||
|
url: "{{ iiab_download_url }}/iwlwifi-8000C-13.ucode"
|
||||||
|
timeout: "{{ download_timeout }}"
|
||||||
when: usb_NUC6.stdout|int > 0
|
when: usb_NUC6.stdout|int > 0
|
||||||
|
|
||||||
# this script can be sourced to get IIAB location
|
# this script can be sourced to get IIAB location
|
||||||
- name: Recording STAGE 1 HAS COMPLETED ============================
|
- name: Recording STAGE 1 HAS COMPLETED ============================
|
||||||
template: src=roles/1-prep/templates/iiab.env.j2
|
template:
|
||||||
dest=/etc/iiab/iiab.env
|
src: roles/1-prep/templates/iiab.env.j2
|
||||||
owner=root
|
dest: /etc/iiab/iiab.env
|
||||||
group=root
|
owner: root
|
||||||
mode=0644
|
group: root
|
||||||
|
mode: 0644
|
||||||
|
|
Loading…
Reference in a new issue