Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Force-install libssl1.1 if MongoDB needed on Ubuntu >= 22.04 (for Sugarizer) #3380

Merged
merged 3 commits into from Sep 27, 2022

Conversation

@holta holta added this to the 8.0 milestone Sep 27, 2022
@holta
Copy link
Member Author

holta commented Sep 27, 2022

Also tested on Ubuntu 22.04 LTS (Jammy Jellyfish) itself.

Looks great ✔️

Comment on lines +96 to +97
- option: os_ver
value: "{{ os_ver }}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is sort of useless info for iiab,ini, only used to load the derived OS.yml file for ansible. Would not even get to this point if incorrect but might be better suited in create_iiab_ini.yml as the underling distro doesn't really change at runtime.

@jvonau
Copy link
Contributor

jvonau commented Oct 13, 2022

What is with the "is_ubuntu and os_ver is version('ubuntu-2204', '>=')" in place of 'is_ubuntu_2204 or is_ubuntu_2210'?

https://docs.ansible.com/ansible/latest/user_guide/playbooks_tests.html

@holta
Copy link
Member Author

holta commented Oct 13, 2022

What is with the "is_ubuntu and os_ver is version('ubuntu-2204', '>=')"

Ubuntu releases often.

e.g. Ubuntu 23.04 pre-release (weeks away) and 23.10 pre-releases will be circulating before we know it, and comparison operators (e.g. >=) provide a failsafe in the interim.

@jvonau
Copy link
Contributor

jvonau commented Oct 13, 2022

Don't need os_ver for that use {{ ansible_distribution_version }} to future proof against ansible.module_utils.compat.version.StrictVersion becoming 'true' at some point in the future. Looks like version_type= is a interim step towards a full semver where mixed numeric+alpha characters are not used.

@holta
Copy link
Member Author

holta commented Oct 13, 2022

Interesting. Ansible might clean up their ability to make very clear what exact OS/distro version is running in future. That'd be great.

Meantime IIAB's os_ver is an active part of IIAB, giving us exactly what's needed, arising from:

# /etc/lsb-release could also be grep'd. But /etc/upstream-release/lsb-release
# on Linux Mint 20 caused grep of /etc/*elease to fail (on directory not file)
if tmp=$(grep ^ID= /etc/os-release); then
OS=$(echo "$tmp" | cut -d= -f2)
OS=${OS//\"/} # Remove all '"'
fi
if [ -f /etc/rpi-issue ]; then
OS="raspbian" # For 64-bit Raspberry Pi OS which contains "ID=debian" as
fi # of 2020: https://github.com/raspberrypi/Raspberry-Pi-OS-64bit/issues/6
if tmp=$(grep ^VERSION_ID= /etc/os-release); then
VERSION_ID=$(echo "$tmp" | cut -d= -f2)
# https://gnu.org/software/bash/manual/bash.html#Shell-Parameter-Expansion
VERSION_ID=${VERSION_ID//\"/} # Remove all '"'
[[ $OS == "ubuntu" ]] && # e.g. '22.04' -> '2204'
VERSION_ID=${VERSION_ID//\./} # Remove all '.'
[[ $OS == "linuxmint" ]] && # e.g. '20.2' -> '20'
VERSION_ID=${VERSION_ID%%.*} # Remove all '.' & stuff to the right
fi
OS_VER="$OS-$VERSION_ID"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants