1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

first_run framework

just remove it
This commit is contained in:
Jerry Vonau 2017-09-19 02:46:37 -05:00
parent e57ff51ca8
commit 6e4540fa08
5 changed files with 26 additions and 21 deletions

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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 }}'

View file

@ -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