mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Merge branch 'master' into less-apache
This commit is contained in:
commit
9676a9a03e
45 changed files with 463 additions and 353 deletions
|
@ -1,31 +1,54 @@
|
|||
# adm_cons_force_ssl: False
|
||||
|
||||
# All above are set in: github.com/iiab/iiab/blob/master/vars/default_vars.yml
|
||||
# If nec, change them by editing /etc/iiab/local_vars.yml prior to installing!
|
||||
|
||||
|
||||
# SEE ALSO /opt/iiab/iiab/roles/1-prep/defaults/main.yml
|
||||
|
||||
# 2021-07-30: Primarily for Admin Console: later change to 443 for #2811 HTTPS?
|
||||
gui_port: 80
|
||||
#is_F18: False # 2021-07-30: No longer used
|
||||
|
||||
# (PRE-)release version number, for {{ iiab_env_file }} = /etc/iiab/iiab.env
|
||||
# iiab_base_ver: 7.1
|
||||
# iiab_base_ver: 8.0
|
||||
# iiab_revision: 0
|
||||
# ABOVE MOVED TO /opt/iiab/iiab/vars/default_vars.yml
|
||||
# ABOVE 3 LINES MOVED TO /opt/iiab/iiab/vars/default_vars.yml
|
||||
|
||||
|
||||
# These entries should never be changed in this file.
|
||||
# These are defaults for boolean routines.
|
||||
|
||||
# 2021-07-30: This variable (first_run) is still used in 2 places:
|
||||
# (1) roles/1-prep/tasks/main.yml for raspberry_pi.yml
|
||||
# (2) roles/network/tasks/named.yml
|
||||
# ...after it is set in 0-init/tasks/main.yml
|
||||
first_run: False
|
||||
rpi_model: none
|
||||
xo_model: none
|
||||
rpi_model: none # 2021-07-30: Broadly used!
|
||||
#xo_model: none # 2021-07-30: No longer used
|
||||
# 2021-07-30: Recorded to /etc/iiab/iiab.ini but not used programmatically:
|
||||
gw_active: False
|
||||
# 2021-07-30: Broadly used, but not in an organized way -- most all IIAB
|
||||
# outfitting/provisioning happens online -- in situations where connectivity
|
||||
# failures should be reported to the operator, rather than papered over:
|
||||
internet_available: False
|
||||
discovered_wan_iface: none
|
||||
discovered_wan_iface: none # 2021-07-30: Very broadly used!
|
||||
|
||||
# Old defs
|
||||
gui_port: 80
|
||||
is_F18: False
|
||||
# 2021-07-30: Barely used -- for {named, dhcpd, squid} in
|
||||
# roles/network/tasks/main.yml -- after being set in 0-init/tasks/network.yml
|
||||
FQDN_changed: False
|
||||
|
||||
# Set default 1-prep discovered hardware
|
||||
rtc_id: none
|
||||
NUC6_firmware_needed: False
|
||||
#rtc_id: none # 2021-07-30: Moved to 1-prep/defaults/main.yml
|
||||
#NUC6_firmware_needed: False # 2021-07-30: Apparently never used
|
||||
|
||||
# Used in 2-common/tasks/xo.yml
|
||||
wifi_id: none
|
||||
#wifi_id: none # 2021-07-30: Had been used in 2-common/tasks/xo.yml
|
||||
|
||||
# Used in 2-common, 3-base-server and roles/network
|
||||
# 2021-07-30: roles/network/tasks/squid.yml#L16 to stop Squid
|
||||
# ("when: not installing") is the only non-Fedora use of this var.
|
||||
# Earlier, this var HAD also been used in 2-common and 3-base-server.
|
||||
installing: False
|
||||
|
||||
# Network
|
||||
# 2021-07-30: Broadly used across roles/network/tasks/*.yml -- but things might
|
||||
# possibly change if roles/network becomes optional per PR #2876 ?
|
||||
no_net_restart: False
|
||||
no_NM_reload: False
|
||||
#no_NM_reload: False # 2021-07-30: Was used in roles/network/tasks/fedora/*
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
value: "{{ ansible_local.local_facts.iiab_commit }}"
|
||||
- option: install_date
|
||||
value: "{{ ansible_date_time.iso8601 }}"
|
||||
- option: xo_model
|
||||
value: "{{ xo_model }}"
|
||||
#- option: xo_model
|
||||
# value: "{{ xo_model }}"
|
||||
- option: rpi_model
|
||||
value: "{{ rpi_model }}"
|
||||
|
|
|
@ -7,12 +7,17 @@
|
|||
|
||||
# Higher-level purpose explained at the bottom of:
|
||||
# https://github.com/iiab/iiab/blob/master/vars/default_vars.yml
|
||||
- name: "Ansible just ran /etc/ansible/facts.d/local_facts.fact to set 11 vars -- here we extract 3 of those -- rpi_model: {{ ansible_local.local_facts.rpi_model }}, xo_model: {{ ansible_local.local_facts.xo_model }}, iiab_stage: {{ ansible_local.local_facts.stage }}"
|
||||
- name: "Ansible just ran /etc/ansible/facts.d/local_facts.fact to set 10 vars -- here we extract 2 of those -- rpi_model: {{ ansible_local.local_facts.rpi_model }}, iiab_stage: {{ ansible_local.local_facts.stage }}"
|
||||
set_fact:
|
||||
rpi_model: "{{ ansible_local.local_facts.rpi_model }}"
|
||||
xo_model: "{{ ansible_local.local_facts.xo_model }}"
|
||||
#xo_model: "{{ ansible_local.local_facts.xo_model }}"
|
||||
iiab_stage: "{{ ansible_local.local_facts.stage }}"
|
||||
|
||||
# 2020-10-29: Appears no longer nec (see 3 above ansible_local.local_facts.*)
|
||||
#- name: Re-read local_facts.facts from /etc/ansible/facts.d
|
||||
# setup:
|
||||
# filter: ansible_local
|
||||
|
||||
# Initialize /etc/iiab/iiab.ini writing the 'location' and 'version' sections
|
||||
# once and only once, to preserve the install date and git hash.
|
||||
- name: Create {{ iiab_ini_file }}, if it doesn't exist
|
||||
|
@ -29,11 +34,6 @@
|
|||
first_run: True
|
||||
when: not iiab_ini_test.stat.exists
|
||||
|
||||
# 2020-10-29: Appears no longer nec (see 3 above ansible_local.local_facts.*)
|
||||
#- name: Re-read local_facts.facts from /etc/ansible/facts.d
|
||||
# setup:
|
||||
# filter: ansible_local
|
||||
|
||||
|
||||
# Copies the latest/known version of iiab-diagnostics into /usr/bin (so it can
|
||||
# be run even if local source tree /opt/iiab/iiab is deleted to conserve disk).
|
||||
|
@ -56,7 +56,7 @@
|
|||
- name: "Time Zone / TZ: Set symlink /etc/localtime to UTC if it doesn't exist?"
|
||||
include_tasks: tz.yml
|
||||
|
||||
- name: Test Gateway + Test Internet + Set new hostname if nec + Set 'gui_port' to 80 or 443 for Admin Console
|
||||
- name: Test Gateway + Test Internet + Set new hostname/domain (hostname.yml) if nec + Set 'gui_port' to 80 or 443 for Admin Console
|
||||
include_tasks: network.yml
|
||||
|
||||
|
||||
|
@ -95,14 +95,14 @@
|
|||
value: "{{ rpi_model }}"
|
||||
- option: first_run
|
||||
value: "{{ first_run }}"
|
||||
- option: local_tz # e.g. EDT after Ansible interprets /etc/localtime below
|
||||
- option: local_tz # e.g. 'EDT' (summer) or 'EST' (winter) after Ansible interprets symlink /etc/localtime -- or 'UTC' if /etc/localtime doesn't exist
|
||||
value: "{{ local_tz }}"
|
||||
- option: etc_localtime.stdout # e.g. America/New_York
|
||||
- option: etc_localtime.stdout # e.g. 'America/New_York' direct from symlink /etc/localtime -- or '' if /etc/localtime doesn't exist
|
||||
value: "{{ etc_localtime.stdout }}"
|
||||
- option: no_NM_reload
|
||||
value: "{{ no_NM_reload }}"
|
||||
- option: is_F18
|
||||
value: "{{ is_F18 }}"
|
||||
#- option: no_NM_reload
|
||||
# value: "{{ no_NM_reload }}"
|
||||
#- option: is_F18
|
||||
# value: "{{ is_F18 }}"
|
||||
- option: FQDN_changed
|
||||
value: "{{ FQDN_changed }}"
|
||||
|
||||
|
|
|
@ -46,15 +46,18 @@
|
|||
iiab_fqdn: "{{ iiab_hostname }}.{{ iiab_domain }}"
|
||||
FQDN_changed: False
|
||||
|
||||
- name: "Set 'FQDN_changed: True' when iiab_fqdn != ansible_fqdn ({{ ansible_fqdn }})"
|
||||
- name: Set hostname / domain (etc) in various places -- if iiab_fqdn != ansible_fqdn ({{ ansible_fqdn }})
|
||||
include_tasks: hostname.yml
|
||||
when: iiab_fqdn != ansible_fqdn
|
||||
|
||||
# 2021-07-30: FQDN_changed isn't used as in the past -- its remaining use is
|
||||
# for {named, dhcpd, squid} in roles/network/tasks/main.yml -- possibly it
|
||||
# should be reconsidered? See PR #2876: roles/network might become optional?
|
||||
- name: "Also set 'FQDN_changed: True' -- if iiab_fqdn != ansible_fqdn ({{ ansible_fqdn }})"
|
||||
set_fact:
|
||||
FQDN_changed: True
|
||||
when: iiab_fqdn != ansible_fqdn
|
||||
|
||||
- name: Set hostname if FQDN_changed
|
||||
include_tasks: hostname.yml
|
||||
when: FQDN_changed
|
||||
|
||||
|
||||
- name: "Set 'gui_port: 80' for Admin Console if not adm_cons_force_ssl"
|
||||
set_fact:
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
register: etc_localtime
|
||||
|
||||
- name: "/etc/localtime now specifies: {{ etc_localtime.stdout }}"
|
||||
command: echo # 'meta: noop' is not enough to force var instantiation above
|
||||
command: echo # 'meta: noop' is not enough to force instantiation of 'name: {{ var }}' just above
|
||||
|
||||
|
||||
#- name: Check for a /etc/localtime symlink to TZ - NEVER FAILS DUE TO PIPE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue