mirror of
https://github.com/iiab/iiab.git
synced 2025-02-12 11:12:06 +00:00
Force-install libssl1.1 if MongoDB needed on Ubuntu >= 22.04
This commit is contained in:
parent
3aae53e693
commit
9f0c5f1e5d
7 changed files with 42 additions and 16 deletions
|
@ -81,15 +81,14 @@ fi
|
||||||
|
|
||||||
echo -e "\n\n./iiab-install $* BEGUN IN $CWD\n"
|
echo -e "\n\n./iiab-install $* BEGUN IN $CWD\n"
|
||||||
|
|
||||||
mkdir -p /etc/iiab/install-flags # MANDATORY since 2022-07-22 (for PR #3318 netwarn pop-ups, asking you to run iiab-network)
|
mkdir -p /etc/iiab/install-flags # MANDATORY since 2022-07-22
|
||||||
|
echo -e "/etc/iiab/install-flags directory created/verified."
|
||||||
|
echo -e "(e.g. for PR #3318 netwarn pop-ups, asking you to run iiab-network)\n"
|
||||||
|
|
||||||
echo -e "local_facts.fact DIAGNOSTICS... (A FEW LINES OF ERRORS/WARNINGS BELOW ARE OK!)\n"
|
echo -e "local_facts.fact DIAGNOSTICS... (A FEW LINES OF ERRORS/WARNINGS BELOW ARE OK!)\n"
|
||||||
|
|
||||||
scripts/local_facts.fact # Exit & advise, if OS not supported.
|
scripts/local_facts.fact # Exit & advise, if OS not supported.
|
||||||
|
|
||||||
if [ ! -f /etc/ansible/facts.d/local_facts.fact ]; then
|
mkdir -p /etc/ansible/facts.d
|
||||||
mkdir -p /etc/ansible/facts.d
|
|
||||||
fi
|
|
||||||
cp scripts/local_facts.fact /etc/ansible/facts.d/local_facts.fact
|
cp scripts/local_facts.fact /etc/ansible/facts.d/local_facts.fact
|
||||||
echo -e "\nPlaced /etc/ansible/facts.d/local_facts.fact into position."
|
echo -e "\nPlaced /etc/ansible/facts.d/local_facts.fact into position."
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,8 @@ apt -y install git curl nano gawk wget pastebinit
|
||||||
cd /opt/iiab/iiab
|
cd /opt/iiab/iiab
|
||||||
scripts/ansible
|
scripts/ansible
|
||||||
|
|
||||||
mkdir -p /etc/iiab/install-flags
|
# 2022-09-27: iiab-install now handles this
|
||||||
|
#mkdir -p /etc/iiab/install-flags
|
||||||
|
|
||||||
if [ ! -f /etc/iiab/local_vars.yml ]; then
|
if [ ! -f /etc/iiab/local_vars.yml ]; then
|
||||||
cp /opt/iiab/iiab/vars/local_vars_none.yml /etc/iiab/local_vars.yml
|
cp /opt/iiab/iiab/vars/local_vars_none.yml /etc/iiab/local_vars.yml
|
||||||
|
|
|
@ -9,9 +9,10 @@
|
||||||
# https://github.com/iiab/iiab/blob/master/vars/default_vars.yml
|
# 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 }}, devicetree_model: {{ ansible_local.local_facts.devicetree_model }}, iiab_stage: {{ ansible_local.local_facts.stage }}"
|
- 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 }}, devicetree_model: {{ ansible_local.local_facts.devicetree_model }}, iiab_stage: {{ ansible_local.local_facts.stage }}"
|
||||||
set_fact:
|
set_fact:
|
||||||
|
iiab_stage: "{{ ansible_local.local_facts.stage }}"
|
||||||
rpi_model: "{{ ansible_local.local_facts.rpi_model }}"
|
rpi_model: "{{ ansible_local.local_facts.rpi_model }}"
|
||||||
devicetree_model: "{{ ansible_local.local_facts.devicetree_model }}"
|
devicetree_model: "{{ ansible_local.local_facts.devicetree_model }}"
|
||||||
iiab_stage: "{{ ansible_local.local_facts.stage }}"
|
os_ver: "{{ ansible_local.local_facts.os_ver }}"
|
||||||
|
|
||||||
# Initialize /etc/iiab/iiab.ini writing the 'location' and 'version' sections
|
# Initialize /etc/iiab/iiab.ini writing the 'location' and 'version' sections
|
||||||
# once and only once, to preserve the install date and git hash.
|
# once and only once, to preserve the install date and git hash.
|
||||||
|
@ -92,6 +93,8 @@
|
||||||
value: "{{ rpi_model }}"
|
value: "{{ rpi_model }}"
|
||||||
- option: devicetree_model
|
- option: devicetree_model
|
||||||
value: "{{ devicetree_model }}"
|
value: "{{ devicetree_model }}"
|
||||||
|
- option: os_ver
|
||||||
|
value: "{{ os_ver }}"
|
||||||
- option: first_run
|
- option: first_run
|
||||||
value: "{{ first_run }}"
|
value: "{{ first_run }}"
|
||||||
- option: local_tz # e.g. 'EDT' (summer) or 'EST' (winter) after Ansible interprets symlink /etc/localtime -- or 'UTC' if /etc/localtime doesn't exist
|
- option: local_tz # e.g. 'EDT' (summer) or 'EST' (winter) after Ansible interprets symlink /etc/localtime -- or 'UTC' if /etc/localtime doesn't exist
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
- name: SUGARIZER
|
- name: SUGARIZER
|
||||||
include_role:
|
include_role:
|
||||||
name: sugarizer
|
name: sugarizer
|
||||||
when: sugarizer_install and not is_ubuntu_2204 and not is_ubuntu_2210 # TEMPORARY
|
when: sugarizer_install
|
||||||
|
|
||||||
- name: Recording STAGE 7 HAS COMPLETED ========================
|
- name: Recording STAGE 7 HAS COMPLETED ========================
|
||||||
lineinfile:
|
lineinfile:
|
||||||
|
|
|
@ -20,8 +20,8 @@
|
||||||
# All above are set in: github.com/iiab/iiab/blob/master/vars/default_vars.yml
|
# 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!
|
# If nec, change them by editing /etc/iiab/local_vars.yml prior to installing!
|
||||||
|
|
||||||
mongodb_64bit_version: 4.4 # 5.0 also works as of 2022-06-09, but can fail on
|
mongodb_64bit_version: 4.4 # 5.0 and 6.0 also work as of 2022-09-27, but fail
|
||||||
# "pre-2011" CPU's lacking AVX. VERIFY both X.Y versions exist (+ work!) below:
|
# on "pre-2011" CPU's w/o AVX. VERIFY both X.Y versions exist (+ work!) below:
|
||||||
#
|
#
|
||||||
# 1) https://www.mongodb.org/static/pgp/server-X.Y.asc ~= https://pgp.mongodb.com
|
# 1) https://www.mongodb.org/static/pgp/server-X.Y.asc ~= https://pgp.mongodb.com
|
||||||
# 2) http://repo.mongodb.org/apt/debian &/OR https://repo.mongodb.org/apt/ubuntu
|
# 2) http://repo.mongodb.org/apt/debian &/OR https://repo.mongodb.org/apt/ubuntu
|
||||||
|
|
|
@ -92,7 +92,6 @@
|
||||||
# this was recently added to https://repo.mongodb.org/apt/debian/dists/
|
# this was recently added to https://repo.mongodb.org/apt/debian/dists/
|
||||||
repo: deb https://repo.mongodb.org/apt/debian bullseye/mongodb-org/{{ mongodb_64bit_version }} main
|
repo: deb https://repo.mongodb.org/apt/debian bullseye/mongodb-org/{{ mongodb_64bit_version }} main
|
||||||
#repo: deb https://repo.mongodb.org/apt/debian {{ ansible_distribution_release }}/mongodb-org/4.4 main
|
#repo: deb https://repo.mongodb.org/apt/debian {{ ansible_distribution_release }}/mongodb-org/4.4 main
|
||||||
state: present
|
|
||||||
filename: mongodb-org
|
filename: mongodb-org
|
||||||
when: is_debian and ansible_architecture == "x86_64"
|
when: is_debian and ansible_architecture == "x86_64"
|
||||||
|
|
||||||
|
@ -100,22 +99,47 @@
|
||||||
- name: Otherwise install mongodb-org's Ubuntu focal source/repo [ arch=amd64,arm64 ] for MongoDB version {{ mongodb_64bit_version }}
|
- name: Otherwise install mongodb-org's Ubuntu focal source/repo [ arch=amd64,arm64 ] for MongoDB version {{ mongodb_64bit_version }}
|
||||||
apt_repository:
|
apt_repository:
|
||||||
repo: deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/{{ mongodb_64bit_version }} multiverse
|
repo: deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/{{ mongodb_64bit_version }} multiverse
|
||||||
state: present
|
|
||||||
filename: mongodb-org
|
filename: mongodb-org
|
||||||
when: not (is_debian and ansible_architecture == "x86_64")
|
when: not (is_debian and ansible_architecture == "x86_64")
|
||||||
|
|
||||||
|
# 2022-09-27: Workaround to install MongoDB on Ubuntu 22.04+, which include
|
||||||
|
# libssl3 instead of libssl1.1 -- https://github.com/iiab/iiab/issues/3190
|
||||||
|
# https://www.mongodb.com/community/forums/t/installing-mongodb-over-ubuntu-22-04/159931
|
||||||
|
# https://askubuntu.com/questions/1403619/mongodb-install-fails-on-ubuntu-22-04-depends-on-libssl1-1-but-it-is-not-insta/1403683#1403683
|
||||||
|
# echo "deb http://security.ubuntu.com/ubuntu focal-security main" | sudo tee /etc/apt/sources.list.d/focal-security.list
|
||||||
|
# sudo apt-get update
|
||||||
|
# sudo apt-get install libssl1.1
|
||||||
|
# rm /etc/apt/sources.list.d/focal-security.list
|
||||||
|
|
||||||
|
- name: Install source/repo "deb http://security.ubuntu.com/ubuntu focal-security main" at /etc/apt/sources.list.d/security_ubuntu_com_ubuntu.list if Ubuntu 22.04+
|
||||||
|
apt_repository:
|
||||||
|
repo: deb http://security.ubuntu.com/ubuntu focal-security main
|
||||||
|
#filename: focal-security # If filename focal-security.list is preferred
|
||||||
|
when: is_ubuntu and os_ver is version('ubuntu-2204', '>=')
|
||||||
|
|
||||||
|
- name: Install libssl1.1 if Ubuntu 22.04+ (required by MongoDB below)
|
||||||
|
package:
|
||||||
|
name: libssl1.1
|
||||||
|
state: present
|
||||||
|
when: is_ubuntu and os_ver is version('ubuntu-2204', '>=')
|
||||||
|
|
||||||
|
- name: Remove source/repo "deb http://security.ubuntu.com/ubuntu focal-security main" at /etc/apt/sources.list.d/security_ubuntu_com_ubuntu.list if Ubuntu 22.04+
|
||||||
|
apt_repository:
|
||||||
|
repo: deb http://security.ubuntu.com/ubuntu focal-security main
|
||||||
|
state: absent
|
||||||
|
#filename: focal-security # 100% IGNORED during repo deletion
|
||||||
|
when: is_ubuntu and os_ver is version('ubuntu-2204', '>=')
|
||||||
|
|
||||||
# # Debian 10 aarch64 might work below but is blocked in main.yml
|
# # Debian 10 aarch64 might work below but is blocked in main.yml
|
||||||
# - name: Use mongodb-org's Ubuntu focal repo for RasPiOS-aarch64
|
# - name: Use mongodb-org's Ubuntu focal repo for RasPiOS-aarch64
|
||||||
# apt_repository:
|
# apt_repository:
|
||||||
# repo: deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse
|
# repo: deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse
|
||||||
# state: present
|
|
||||||
# filename: mongodb-org
|
# filename: mongodb-org
|
||||||
# when: is_raspbian and ansible_architecture == "aarch64"
|
# when: is_raspbian and ansible_architecture == "aarch64"
|
||||||
|
|
||||||
# - name: Use mongodb-org's Ubuntu focal repo for Linux Mint - 64bit only
|
# - name: Use mongodb-org's Ubuntu focal repo for Linux Mint - 64bit only
|
||||||
# apt_repository:
|
# apt_repository:
|
||||||
# repo: deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse
|
# repo: deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse
|
||||||
# state: present
|
|
||||||
# filename: mongodb-org
|
# filename: mongodb-org
|
||||||
# when: is_linuxmint
|
# when: is_linuxmint
|
||||||
|
|
||||||
|
@ -126,7 +150,6 @@
|
||||||
# # so other Ubuntu's like groovy 20.10 need to revert to recent LTS repo:
|
# # so other Ubuntu's like groovy 20.10 need to revert to recent LTS repo:
|
||||||
# repo: deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse
|
# repo: deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/5.0 multiverse
|
||||||
# #repo: deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu {{ ansible_distribution_release }}/mongodb-org/4.4 multiverse
|
# #repo: deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu {{ ansible_distribution_release }}/mongodb-org/4.4 multiverse
|
||||||
# state: present
|
|
||||||
# filename: mongodb-org
|
# filename: mongodb-org
|
||||||
# when: is_ubuntu and not is_linuxmint
|
# when: is_ubuntu and not is_linuxmint
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
- debug:
|
- debug:
|
||||||
var: rpi_model # 0-init sets it from ansible_local.local_facts.rpi_model
|
var: rpi_model # 0-init sets it from ansible_local.local_facts.rpi_model
|
||||||
- debug:
|
- debug:
|
||||||
var: ansible_local.local_facts.os_ver # Like OS_VER in /etc/iiab/iiab.env
|
var: os_ver # Equivalent to ansible_local.local_facts.os_ver and OS_VER in /etc/iiab/iiab.env
|
||||||
- debug:
|
- debug:
|
||||||
var: is_debian
|
var: is_debian
|
||||||
- debug:
|
- debug:
|
||||||
|
|
Loading…
Reference in a new issue