mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
commit
965b134e88
8 changed files with 30 additions and 29 deletions
1
iiab.yml
1
iiab.yml
|
@ -6,7 +6,6 @@
|
|||
- vars/default_vars.yml
|
||||
- vars/{{ ansible_local.local_facts.os_ver}}.yml
|
||||
- vars/local_vars.yml
|
||||
- /etc/iiab/config_vars.yml
|
||||
|
||||
roles:
|
||||
- { role: 1-prep, tags: ['prep','platform','base'] }
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
# use these as a tag a release at a point in time
|
||||
iiab_base_ver: 0
|
||||
iiab_base_ver: 6.4
|
||||
gui_version: 2
|
||||
|
||||
# These entries should never be changed in this file.
|
||||
# These are defaults for boolean routines,
|
||||
first_run: False
|
||||
installing: False
|
||||
NUC6_firmware_needed: False
|
||||
exFAT_enabled: False
|
||||
|
|
|
@ -1,24 +1,26 @@
|
|||
- name: Checking iiab_domain_name
|
||||
shell: "cat /etc/sysconfig/iiab_domain_name"
|
||||
register: prior_domain
|
||||
ignore_errors: True
|
||||
when: not first_run
|
||||
|
||||
# above always registers
|
||||
- name: Checking for prior domain name
|
||||
set_fact:
|
||||
iiab_domain: "{{ prior_domain.stdout }}"
|
||||
when: prior_domain.stdout != "lan" and prior_domain.stdout != ""
|
||||
when: not first_run and prior_domain.stdout != "lan" and prior_domain.stdout != ""
|
||||
|
||||
- name: iiab_wan_device
|
||||
shell: "cat /etc/sysconfig/iiab_wan_device"
|
||||
register: prior_gw
|
||||
ignore_errors: True
|
||||
when: not first_run
|
||||
|
||||
- name: Checking for old device gateway interface for device test
|
||||
set_fact:
|
||||
device_gw: "{{ prior_gw.stdout }}"
|
||||
device_gw2: "{{ prior_gw.stdout }}"
|
||||
when: prior_gw is defined and prior_gw.stdout != ""
|
||||
when: not first_run and prior_gw is defined and prior_gw.stdout != ""
|
||||
|
||||
#pause checking
|
||||
|
||||
# Discover do we have a gateway? -- if ansible detects gateway, becomes WAN candidate
|
||||
- name: Finding gateway
|
||||
|
|
|
@ -1,8 +1,3 @@
|
|||
# temp
|
||||
- name: temp placekeeper
|
||||
set_fact:
|
||||
first_run: False
|
||||
|
||||
- name: Checking for ifcfg-WAN file - Can Fail
|
||||
stat: path=/etc/sysconfig/network-scripts/ifcfg-WAN
|
||||
register: has_ifcfg_WAN
|
||||
|
|
|
@ -30,7 +30,5 @@
|
|||
value: '{{ ansible_local["local_facts"]["iiab_commit"] }}'
|
||||
- option: 'install_date'
|
||||
value: '{{ ansible_date_time["iso8601"] }}'
|
||||
- option: 'Universal Unique ID (uuid)'
|
||||
value: '{{ uuid }}'
|
||||
- option: 'install_xo'
|
||||
value: '{{ xo_model }}'
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
- name: Determine if runansible was run
|
||||
stat: path=/etc/iiab/config_vars.yml
|
||||
register: NewInstall
|
||||
|
||||
- name: Setting first run flag
|
||||
set_fact:
|
||||
first_run: True
|
||||
when: NewInstall.stat.exists is defined and not NewInstall.stat.exists
|
||||
|
||||
# we need to inialize the ini file
|
||||
- include: iiab_ini.yml
|
||||
when: first_run
|
||||
|
||||
- name: Set flag for fedora 18
|
||||
set_fact:
|
||||
is_F18: True
|
||||
|
@ -50,13 +63,13 @@
|
|||
|
||||
- name: Disable apparmor -- on by default in ubuntu
|
||||
service: name=apparmor enabled=False state=stopped
|
||||
when: is_ubuntu
|
||||
when: first_run and is_ubuntu
|
||||
ignore_errors: true
|
||||
|
||||
- name: Disable selinux on next boot
|
||||
selinux: state=disabled
|
||||
register: selinux_disabled
|
||||
when: ansible_selinux is defined and ansible_version >= '2' and ansible_selinux or ansible_selinux['status'] is defined and ansible_version < '2' and ansible_selinux['status'] != 'disabled'
|
||||
when: first_run
|
||||
|
||||
- name: Disable selinux for this session (if needed)
|
||||
command: setenforce Permissive
|
||||
|
@ -72,26 +85,22 @@
|
|||
|
||||
- include: prep.yml
|
||||
|
||||
# we need to inialize the ini file
|
||||
- include: iiab_ini.yml
|
||||
|
||||
- include: computed_vars.yml
|
||||
|
||||
- include: detected_network.yml
|
||||
when: not installing
|
||||
|
||||
|
||||
# Put conditional actions for hardware platforms here
|
||||
- include: raspberry_pi_2.yml
|
||||
when: rpi_model != "none"
|
||||
when: first_run and rpi_model != "none"
|
||||
|
||||
- name: Check if the identifier for intel's NUC6 builtin wifi is present
|
||||
shell: "lsusb | grep 8087:0a2b | wc |awk '{print $1}'"
|
||||
register: usb_NUC6
|
||||
ignore_errors: true
|
||||
when: first_run
|
||||
|
||||
- name: download the firmware for built in wifi on NUC6
|
||||
get_url: dest=/lib/firmware
|
||||
url={{ iiab_download_url }}/iwlwifi-8000C-13.ucode
|
||||
when: usb_NUC6.stdout|int > 0
|
||||
|
||||
when: first_run and usb_NUC6.stdout|int > 0
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
- name: Addon services installed
|
||||
command: echo Addon services installed
|
||||
|
||||
- name: Installation Complete
|
||||
shell: echo "{}" > /etc/iiab/config_vars.yml
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
#!/bin/bash
|
||||
# copy var files to /etc/iiab for subsequent use
|
||||
mkdir -p /etc/iiab
|
||||
if [ ! -f /etc/iiab/config_vars.yml ]; then
|
||||
echo "{}" > /etc/iiab/config_vars.yml
|
||||
fi
|
||||
|
||||
# if vars/local_vars.yml is missing, put a default one in place
|
||||
if [ ! -f ./vars/local_vars.yml ]; then
|
||||
OS=`grep ^ID= /etc/*release|cut -d= -f2`
|
||||
|
@ -77,3 +71,4 @@ export ANSIBLE_LOG_PATH="$XSCE_DIR/iiab-install.log"
|
|||
ansible -m setup -i $INVENTORY localhost --connection=local >> /dev/null
|
||||
|
||||
ansible-playbook -i $INVENTORY $PLAYBOOK ${ARGS} --connection=local
|
||||
#ansible-playbook -i $INVENTORY $PLAYBOOK ${ARGS} --syntax-check
|
||||
|
|
Loading…
Add table
Reference in a new issue