mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Merge pull request #531 from jvonau/revision2
revision2: iiab_base_ver, iiab_revision & reserved_wifi
This commit is contained in:
commit
1b9a1a752e
7 changed files with 34 additions and 29 deletions
|
@ -1,6 +1,6 @@
|
|||
# use these as a tag a release at a point in time
|
||||
iiab_base_ver: 6.4
|
||||
gui_version: 2
|
||||
iiab_revision: 0
|
||||
|
||||
# These entries should never be changed in this file.
|
||||
# These are defaults for boolean routines,
|
||||
|
|
|
@ -1,35 +1,39 @@
|
|||
# workaround for fact that auto create does not work on ini_file
|
||||
- name: Create iiab config file
|
||||
file: dest='{{ iiab_config_file }}'
|
||||
state=touch
|
||||
file:
|
||||
dest: '{{ iiab_config_file }}'
|
||||
state: touch
|
||||
|
||||
- name: Add location section to config file
|
||||
ini_file: dest='{{ iiab_config_file }}'
|
||||
section=location
|
||||
option='{{ item.option }}'
|
||||
value='{{ item.value }}'
|
||||
ini_file:
|
||||
dest: '{{ iiab_config_file }}'
|
||||
section: location
|
||||
option: '{{ item.option }}'
|
||||
value: '{{ item.value }}'
|
||||
with_items:
|
||||
- option: 'iiab_base'
|
||||
value: '{{ iiab_base }}'
|
||||
- option: 'iiab_dir'
|
||||
value: '{{ iiab_dir }}'
|
||||
|
||||
- name: Add version section
|
||||
ini_file: dest='{{ iiab_config_file }}'
|
||||
section=version
|
||||
option='{{ item.option }}'
|
||||
value='{{ item.value }}'
|
||||
- name: add version section
|
||||
ini_file:
|
||||
dest: '{{ iiab_config_file }}'
|
||||
section: version
|
||||
option: '{{ item.option }}'
|
||||
value: '{{ item.value }}'
|
||||
with_items:
|
||||
- option: 'distribution'
|
||||
value: '{{ ansible_distribution }}'
|
||||
- option: 'arch'
|
||||
value: '{{ ansible_architecture }}'
|
||||
- option: 'iiab_base_ver'
|
||||
value: '{{ iiab_base_ver }}'
|
||||
- option: 'iiab_branch'
|
||||
value: '{{ ansible_local["local_facts"]["iiab_branch"] }}'
|
||||
value: '{{ ansible_local.local_facts.iiab_branch }}'
|
||||
- option: 'iiab_commit'
|
||||
value: '{{ ansible_local["local_facts"]["iiab_commit"] }}'
|
||||
value: '{{ ansible_local.local_facts.iiab_commit }}'
|
||||
- option: 'install_date'
|
||||
value: '{{ ansible_date_time["iso8601"] }}'
|
||||
value: '{{ ansible_date_time.iso8601 }}'
|
||||
- option: 'install_xo'
|
||||
value: '{{ xo_model }}'
|
||||
|
||||
|
|
|
@ -20,13 +20,12 @@
|
|||
- name: Re-read local_facts.facts from /etc/ansible/facts.d
|
||||
setup: filter=ansible_local
|
||||
|
||||
# set top level variables from local facts for convenience
|
||||
- set_fact:
|
||||
- name: Set top level variables from local facts for convenience
|
||||
set_fact:
|
||||
xo_model: '{{ ansible_local.local_facts.xo_model }}'
|
||||
phplib_dir: '{{ ansible_local.local_facts.phplib_dir }}'
|
||||
iiab_stage: '{{ ansible_local.local_facts.stage }}'
|
||||
|
||||
# Networking uses a different file for the rpi
|
||||
- name: Discover if this is running Raspbian -- if so assume it is a RPi
|
||||
set_fact:
|
||||
rpi_model: "rpi"
|
||||
|
@ -164,6 +163,10 @@
|
|||
with_items:
|
||||
- option: 'iiab_stage'
|
||||
value: '{{ iiab_stage }}'
|
||||
- option: 'iiab_base_ver'
|
||||
value: '{{ iiab_base_ver }}'
|
||||
- option: 'iiab_revision'
|
||||
value: '{{ iiab_revision }}'
|
||||
- option: 'runtime_php'
|
||||
value: '{{ phplib_dir }}'
|
||||
- option: 'runtime_branch'
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
# It can sourced in a shell script or read into an application
|
||||
IIAB_BASE_PATH={{ iiab_base }}
|
||||
IIAB_DIR={{ iiab_dir }}
|
||||
IIAB_RELEASE={{ iiab_base_ver }}
|
||||
IIAB_REVISION={{ iiab_revision }}
|
||||
OS={{ ansible_local.local_facts.os }}
|
||||
OS_VER={{ ansible_local.local_facts.os_ver }}
|
||||
WWWROOT={{ doc_root }}
|
||||
|
|
|
@ -62,10 +62,5 @@
|
|||
mode={{ item.mode }}
|
||||
with_items:
|
||||
- { src: 'kalite-serve.service.j2', dest: '/etc/systemd/system/kalite-serve.service', mode: '0644'}
|
||||
- { src: 'kalite.sh.j2', dest: '/etc/profile.d/kalite.sh', mode: '0644'}
|
||||
- { src: 'kalite.sh.j2', dest: '/usr/bin/kalite', mode: '0755'}
|
||||
- { src: 'kalite.conf', dest: '/etc/{{ apache_config_dir }}', mode: '0644'}
|
||||
|
||||
- name: Create symlink to kalite bin file in path
|
||||
file: path=/usr/bin/kalite
|
||||
src={{ kalite_venv }}/bin/kalite
|
||||
state=link
|
||||
|
|
|
@ -1,2 +1,4 @@
|
|||
#!/bin/bash
|
||||
KALITE_HOME={{ kalite_root }}
|
||||
export KALITE_HOME
|
||||
{{ kalite_venv }}/bin/kalite $@
|
||||
|
|
|
@ -81,11 +81,10 @@
|
|||
ap_device: "eth0"
|
||||
when: iiab_wan_iface != "eth0" and discovered_wireless_iface != "none" and xo_model == "XO-1.5"
|
||||
|
||||
# takes adapter name
|
||||
- name: Blacklisted WiFi adapter
|
||||
- name: Exclude reserved WiFi adapter if defined - takes adapter name
|
||||
set_fact:
|
||||
ap_device: "{{ blacklist_wifi }}"
|
||||
when: blacklist_wifi is defined and discovered_wireless_iface != iiab_wan_iface and num_wifi_interfaces >= "2"
|
||||
ap_device: "{{ reserved_wifi }}"
|
||||
when: reserved_wifi is defined and discovered_wireless_iface != iiab_wan_iface and num_wifi_interfaces >= "2"
|
||||
|
||||
- name: Count LAN ifaces
|
||||
shell: ls /sys/class/net | grep -v -e wwlan -e ppp -e lo -e br0 -e tun -e {{ device_gw }} -e {{ ap_device }} | wc -l
|
||||
|
|
Loading…
Add table
Reference in a new issue