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

revamp ansible for the future #2512

Closed
wants to merge 4 commits into from
Closed

revamp ansible for the future #2512

wants to merge 4 commits into from

Conversation

jvonau
Copy link
Contributor

@jvonau jvonau commented Sep 9, 2020

Fixes bug:

support ansible 2.9.7 or later(2.10.X) on Ubuntu

Description of changes proposed in this pull request:

Switch Ubuntu to use ansible's ppa

Smoke-tested on which OS or OS's:

lightly tested on RaspOS

@holta holta added this to the 7.2 milestone Sep 9, 2020
@holta
Copy link
Member

holta commented Sep 9, 2020

Ansible 2.10.1 seems to be delayed by a few days, but when it's released (in the coming week likely!) this is the kind of thing #2479 needs.

$APT_PATH/apt -y --allow-downgrades install ansible python3-pymysql python3-psycopg2 \
python3-passlib python3-pip python3-setuptools python3-venv virtualenv
echo -e "\napt update; install dirmngr; PPA to /etc/apt/sources.list.d/iiab-ansible.list\n"
echo "deb http://ppa.launchpad.net/ansible/ansible/ubuntu "$release" main" \
Copy link
Member

Choose a reason for hiding this comment

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

A more automated option (not sure this is desirable?!) might be:

apt install software-properties-common
apt-add-repository ppa:user/distro/repository

Where distro would presumably be $release as follows?

apt-add-repository ppa:ansible/$release/ansible

As documented by apt-add-repository -h (if we ever want to consider this more automated approach?)

If so, apt-add-repository -r (same as --remove) supports "remove repository from sources.list.d directory" if we ever need that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that would work but why, this method has worked well for a while? Don't think I like the dependencies like unattended-upgrades, video&audio support that would be dragged in on debian|raspOS.

pi@box:/opt/iiab/iiab $ sudo apt install software-properties-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
gir1.2-packagekitglib-1.0 libappstream4 libglib2.0-bin libgstreamer1.0-0
libpackagekit-glib2-18 libstemmer0d packagekit packagekit-tools python3-distro-info
python3-pycurl python3-software-properties unattended-upgrades
The following NEW packages will be installed:
gir1.2-packagekitglib-1.0 libappstream4 libglib2.0-bin libgstreamer1.0-0
libpackagekit-glib2-18 libstemmer0d packagekit packagekit-tools python3-distro-info
python3-pycurl python3-software-properties software-properties-common
unattended-upgrades

Copy link
Member

Choose a reason for hiding this comment

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

Indeed apt-add-repository is not necessary today.

It's just an option if an automated solution delivers more reliability in future.

Similar to Debian & RaspiOS both now moving to apparmor (raspberrypi/linux#1698 (comment)) and likewise unattended-upgrades will almost certainly arrive as default OS policy in coming years, e.g. to manage the flood of published security holes in RaspiOS etc (when "makers" don't do security audits, all too often selfishly creating chaos for others).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The trouble with unattended-upgrades and calling apt install foo is the first touch point is in "iiab" with the mass os update, the issue needs to be addressed there. Checking for a lock file and disabling unattended-upgrades while the OS is being altered can be done but lets address that later.

@jvonau
Copy link
Contributor Author

jvonau commented Sep 9, 2020

I found it a bit funny that we use ansible's ubuntu packages from OS's that were deemed unsupported. With 18.04 being LTS it's a bit of a heavy hammer to turn way users of this OS, not saying we can fully test the support but rather be listed as 'use at your own risk with feedback welcome'. As for 19.10, it's a short lived OS with an easy upgrade path to 20.4 which users should be aware of, it can be removed as it is EOL'd but I left it in for now.

@holta
Copy link
Member

holta commented Sep 9, 2020

I found it a bit funny that we use ansible's ubuntu packages from OS's that were deemed unsupported. With 18.04 being LTS it's a bit of a heavy hammer to turn way users of this OS, not saying we can fully test the support but rather be listed as 'use at your own risk with feedback welcome'. As for 19.10, it's a short lived OS with an easy upgrade path to 20.4 which users should be aware of, it can be removed as it is EOL'd but I left it in for now.

Good points.

That said, as discussed on last week's IIAB call, @georgejhunt & I strongly prefer that IIAB look to the future not the past — supporting far less OS's rather than far more OS's. Especially when Ubuntu 19.10 is no longer supported even by Canonical.

Things like Ubuntu 20.10 (apparently with official Desktop support for RPi?) appear to be a far higher priority for IIAB's educational/field community, if we absolutely must support Yet Another OS/Distro (at great cost in terms of our limited testing resources). In any case, these decisions should be driven by Field Communities' Actual Needs far more than Developers' Dreamlines.

@jvonau
Copy link
Contributor Author

jvonau commented Sep 11, 2020

Just looking at http://ppa.launchpad.net/ansible/ansible/ubuntu/pool/main/a/ and drilling down shows the code name ''eoan" is only available for 2.10.X, making this PR suitable for only the 2.10 series of ansible.

@holta
Copy link
Member

holta commented Sep 11, 2020

Numerically it's counterintuitive that ansible-2.10.0 is being release AFTER ansible-base-2.10.1 but FYI here are the projected new release dates for both:

  • 14-Sep-2020: ansible-base-2.10.1 final
  • 15-Sep-2020: ansible-2.10.0rc1 (moved from 10-Sep)
    ...
  • 22-Sep-2020: If no blockers are found, ansible-2.10.0 final will
    release as previously scheduled.

https://groups.google.com/forum/#!topic/ansible-devel/618bSHJ7K64

(Presumably ansible-2.10.0 refers to the "batteries included" larger package with classic/easy install, i.e. presumably it will include BOTH ansible-base-2.10.1 AND common "Ansible Collections" ? Even despite the numbering anomaly that "parent" package 2.10.0 will include "child" package 2.10.1 ;)

@holta
Copy link
Member

holta commented Sep 15, 2020

PR #2518 "Begin transition to Ansible 2.10 (now that ansible-base 2.10.1 is released & appears solid!)" merged, building (in part) on this work.

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.

2 participants