mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Merge pull request #2531 from iiab/revert-2500-iiab-upgrade
Structural merges at the end of a release cycle are Not Ok
This commit is contained in:
commit
85c1acc16a
7 changed files with 15 additions and 62 deletions
|
@ -8,8 +8,6 @@
|
||||||
first_run: False
|
first_run: False
|
||||||
rpi_model: none
|
rpi_model: none
|
||||||
xo_model: none
|
xo_model: none
|
||||||
do_upgrade: False
|
|
||||||
do_reinstall: False
|
|
||||||
gw_active: False
|
gw_active: False
|
||||||
internet_available: False
|
internet_available: False
|
||||||
discovered_wan_iface: none
|
discovered_wan_iface: none
|
||||||
|
|
|
@ -1,21 +1,20 @@
|
||||||
# Initialize
|
# Initialize
|
||||||
- name: ...IS BEGINNING ============================================
|
- name: ...IS BEGINNING ============================================
|
||||||
#- name: Re-read local_facts.facts from /etc/ansible/facts.d
|
stat:
|
||||||
# setup:
|
path: "{{ iiab_env_file }}"
|
||||||
# filter: ansible_local
|
register: NewInstall
|
||||||
#- name: Set top-level variables from local_facts for convenience
|
|
||||||
|
- name: Set first_run flag
|
||||||
|
set_fact:
|
||||||
|
first_run: True
|
||||||
|
when: not NewInstall.stat.exists
|
||||||
|
|
||||||
|
- name: Set top-level variables from local_facts for convenience
|
||||||
set_fact:
|
set_fact:
|
||||||
rpi_model: "{{ ansible_local.local_facts.rpi_model }}"
|
rpi_model: "{{ ansible_local.local_facts.rpi_model }}"
|
||||||
xo_model: "{{ ansible_local.local_facts.xo_model }}"
|
xo_model: "{{ ansible_local.local_facts.xo_model }}"
|
||||||
phplib_dir: "{{ ansible_local.local_facts.phplib_dir }}"
|
phplib_dir: "{{ ansible_local.local_facts.phplib_dir }}"
|
||||||
iiab_stage: "{{ ansible_local.local_facts.stage }}"
|
iiab_stage: "{{ ansible_local.local_facts.stage }}"
|
||||||
installed_release: "{{ ansible_local.local_facts.installed_release }}"
|
|
||||||
installed_revision: "{{ ansible_local.local_facts.installed_revision }}"
|
|
||||||
|
|
||||||
- name: Set first_run flag
|
|
||||||
set_fact:
|
|
||||||
first_run: True
|
|
||||||
when: iiab_stage | int == 0
|
|
||||||
|
|
||||||
# We need to inialize the ini file and only write the location and version
|
# We need to inialize the ini file and only write the location and version
|
||||||
# sections once and only once to preserve the install date and git hash.
|
# sections once and only once to preserve the install date and git hash.
|
||||||
|
@ -37,31 +36,13 @@
|
||||||
path: /etc/iiab/diag
|
path: /etc/iiab/diag
|
||||||
mode: '0777'
|
mode: '0777'
|
||||||
|
|
||||||
|
- name: Re-read local_facts.facts from /etc/ansible/facts.d
|
||||||
|
setup:
|
||||||
|
filter: ansible_local
|
||||||
|
|
||||||
- name: Pre-check that IIAB's "XYZ_install" + "XYZ_enabled" vars (1) are defined, (2) are boolean-not-string variables, and (3) contain plausible values. Also checks that "XYZ_install" is True when "XYZ_installed" is defined.
|
- name: Pre-check that IIAB's "XYZ_install" + "XYZ_enabled" vars (1) are defined, (2) are boolean-not-string variables, and (3) contain plausible values. Also checks that "XYZ_install" is True when "XYZ_installed" is defined.
|
||||||
include_tasks: validate_vars.yml
|
include_tasks: validate_vars.yml
|
||||||
|
|
||||||
# the below 2 stanza don't do anything functional at the moment, more
|
|
||||||
# informational you will see 'changed'. The real work would be done by
|
|
||||||
# iiab-upgrade via auto deleting the *_installed flag in iiab_state.yml
|
|
||||||
# based on entries in upgrade_roles. It is just plain easier to delete the
|
|
||||||
# marker before ansible loads iiab_state.yml like runrole --reinstall does.
|
|
||||||
# https://github.com/jvonau/iiab-factory/blob/iiab-upgrade/iiab-upgrade
|
|
||||||
# Might work on loading iiab_state.yml on demand via conditionals in the future.
|
|
||||||
|
|
||||||
# this one is informational you will see 'changed'.
|
|
||||||
- name: Upgrade situation detected
|
|
||||||
set_fact:
|
|
||||||
do_upgrade: True
|
|
||||||
when: installed_revision|int < iiab_revision|int
|
|
||||||
|
|
||||||
# leave at 7.2 when branching to 7.3, bump to 7.3 when 7.4 or 8.0 comes along.
|
|
||||||
# does nothing at the moment for future use, just denotes a major change in the
|
|
||||||
# starting point of the install.
|
|
||||||
- name: Reinstall situation detected
|
|
||||||
set_fact:
|
|
||||||
do_reinstall: True
|
|
||||||
when: not installed_release == "0" and installed_release == "7.2"
|
|
||||||
|
|
||||||
# Discover: do we have a gateway?
|
# Discover: do we have a gateway?
|
||||||
# If Ansible detects gateway, becomes WAN candidate.
|
# If Ansible detects gateway, becomes WAN candidate.
|
||||||
- name: "Do we have a gateway? If so set discovered_wan_iface: {{ ansible_default_ipv4.alias }}"
|
- name: "Do we have a gateway? If so set discovered_wan_iface: {{ ansible_default_ipv4.alias }}"
|
||||||
|
|
|
@ -30,12 +30,6 @@
|
||||||
name: calibre-web
|
name: calibre-web
|
||||||
when: calibreweb_install | bool
|
when: calibreweb_install | bool
|
||||||
|
|
||||||
- name: Record IIAB_REVISION
|
|
||||||
lineinfile:
|
|
||||||
path: "{{ iiab_env_file }}"
|
|
||||||
regexp: '^IIAB_REVISION=*'
|
|
||||||
line: 'IIAB_REVISION={{ iiab_revision }}'
|
|
||||||
|
|
||||||
- name: Recording STAGE 9 HAS COMPLETED ====================
|
- name: Recording STAGE 9 HAS COMPLETED ====================
|
||||||
lineinfile:
|
lineinfile:
|
||||||
path: "{{ iiab_env_file }}"
|
path: "{{ iiab_env_file }}"
|
||||||
|
|
|
@ -5,12 +5,8 @@
|
||||||
if [ -f /etc/iiab/iiab.env ]; then
|
if [ -f /etc/iiab/iiab.env ]; then
|
||||||
source /etc/iiab/iiab.env
|
source /etc/iiab/iiab.env
|
||||||
STAGE=$STAGE
|
STAGE=$STAGE
|
||||||
INSTALLED_RELEASE=$IIAB_RELEASE
|
|
||||||
INSTALLED_REVISION=$IIAB_REVISION
|
|
||||||
else
|
else
|
||||||
STAGE=0
|
STAGE=0
|
||||||
INSTALLED_RELEASE=0
|
|
||||||
INSTALLED_REVISION=0
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
OS=`grep ^ID= /etc/*elease|cut -d= -f2`
|
OS=`grep ^ID= /etc/*elease|cut -d= -f2`
|
||||||
|
@ -88,8 +84,6 @@ SYSD_NETD=`systemctl is-enabled systemd-networkd`
|
||||||
|
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
{"phplib_dir" : "$PHPLIB_DIR",
|
{"phplib_dir" : "$PHPLIB_DIR",
|
||||||
"installed_release" : "$INSTALLED_RELEASE",
|
|
||||||
"installed_revision" : "$INSTALLED_REVISION",
|
|
||||||
"stage" : "$STAGE",
|
"stage" : "$STAGE",
|
||||||
"dhcpcd" : "$DHCPCD",
|
"dhcpcd" : "$DHCPCD",
|
||||||
"network_manager" : "$NM",
|
"network_manager" : "$NM",
|
||||||
|
|
|
@ -1,3 +0,0 @@
|
||||||
1 osm_vector_maps
|
|
||||||
2 gitea
|
|
||||||
3 lokole
|
|
|
@ -1,11 +0,0 @@
|
||||||
# tagged https://github.com/iiab/iiab/releases/tag/7.1.5-premap
|
|
||||||
# git 5d64c066627f664d2a20da50d4a249c3ca87529a as 0 revision stating point
|
|
||||||
# https://github.com/holta/iiab/compare/5GHz-warning-with-dual-wifi...iiab:master
|
|
||||||
|
|
||||||
# pbx was non-installable prior to #2489 - no upgrade need
|
|
||||||
# #2515 would need a pass through the network role via ./iiab-network or ICO
|
|
||||||
1 osm-vector-maps #2487
|
|
||||||
# mongodb #2487 #2584: bugfix for 64bit debian - upgrade on 64bit ubuntu
|
|
||||||
# - no change for 32bit OSs
|
|
||||||
2 gitea #2504
|
|
||||||
3 lokole #2514
|
|
|
@ -14,7 +14,7 @@
|
||||||
|
|
||||||
# IIAB (PRE-)release version number, for {{ iiab_env_file }}
|
# IIAB (PRE-)release version number, for {{ iiab_env_file }}
|
||||||
iiab_base_ver: 7.2
|
iiab_base_ver: 7.2
|
||||||
iiab_revision: 3
|
iiab_revision: 0
|
||||||
|
|
||||||
iiab_etc_path: /etc/iiab
|
iiab_etc_path: /etc/iiab
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue