linux-system-roles / template

example template for creating new subsystem roles
https://linux-system-roles.github.io/template/
MIT License
13 stars 20 forks source link

Fix centos6 repos; use standard centos images; add centos8 #59

Closed richm closed 3 years ago

richm commented 3 years ago

Use the new vault.centos.org repos. Fix the yum repo configs in the image if necessary to use these new repos. Use the standard centos images from the centos registry rather than custom lsr images from dockerhub. Add support for centos8.

richm commented 3 years ago

@nhosoi @cathay4t @Jakuje This PR addresses the centos6 molecule issues such as

failed: [localhost] (item=molecule_local/docker.io/linuxsystemroles/centos-6) ....

and also fixes problems using the docker.io registry by using the centos base images instead of the custom linuxsystemroles images. This also adds support for centos8 to molecule. Yes I realize centos is being somewhat deprecated or changed - at some point if we keep molecule we'll switch to centos stream images or perhaps RHEL UBI - but I don't expect any changes to centos6 or centos7 until they ultimately EOL.

Note that this PR doesn't fix molecule errors such as

ERROR: Cannot install ansible-lint==4.3.5 and ansible==2.7.* because these package versions have conflicting dependencies.

That particular error is fixed in https://github.com/linux-system-roles/tox-lsr/releases/tag/1.0.1 - so the fix is to edit your .github/workflows/tox.yml like

  TOX_LSR: "git+https://github.com/linux-system-roles/tox-lsr@1.0.1"

or, if you always want to use the latest tox-lsr, use

  TOX_LSR: "git+https://github.com/linux-system-roles/tox-lsr@main"
richm commented 3 years ago

Also note that many roles do not support centos6, and some do not support centos7, so those platforms will be omitted when applying this patch to those repos.

richm commented 3 years ago

Note that the next step will be to get rid of ansible 2.7 support in CI, which means we can get rid of the sudo alternatives --set python /usr/bin/python3 because ansible 2.8 and later do a better job of auto-detecting the correct version of python to use.

richm commented 3 years ago

ok - I figured out a better way to support using /usr/bin/python3 for the ansible python interpreter on centos8 without using sudo alternatives --set python /usr/bin/python3

richm commented 3 years ago

If there are no further objections I'd like to get this merged so I can start rolling out this change to all of the repos.