Feat: Upgrade git to v2.36 for CentOS7 78/70478/2 v0.11.0
authorAnil Belur <abelur@linuxfoundation.org>
Wed, 10 Aug 2022 23:47:36 +0000 (09:47 +1000)
committerAnil Belur <abelur@linuxfoundation.org>
Wed, 10 Aug 2022 23:57:06 +0000 (09:57 +1000)
- v2.24 packages are no longer available on the CentOS mirrors.
  Disable warning to use yum module.
- Fix install python script to check python/python3 to test, since
  the default python3 is not available on CentOS7 platforms.
- Print the default version of python installed.

Issue-ID: IT-24376
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Change-Id: Id48ad72aba776ed4092a292c4db1ad6459d9ab64
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
provision/install-base-pkgs-RedHat.yaml
provision/install-python.sh
releasenotes/notes/upgrade-git236-f11b0f4928dbd428.yaml [new file with mode: 0644]

index cfd4207..eb54182 100644 (file)
   when:
     - ansible_facts['distribution_major_version'] is version('8', '>=')
 
-- name: Swap to git224
+- name: Swap to git236
   block:
     - name: Install yum-plugin-replace
       yum:
     - name: Gather rpm package facts
       package_facts:
         manager: auto
-    - name: Replace git with git224
-      command: yum replace -y git --replace-with git224
+    - name: Replace git with git236
+      command: yum replace -y git --replace-with git236
+      args:
+        warn: false
       when: ansible_facts.packages['git'] is defined
   become: true
   when:
index c98cf71..5817efb 100755 (executable)
@@ -90,8 +90,10 @@ if is_ubuntu; then
     # Ubuntu 20.04 and newer can default to Python 3
     if apt-cache show python-is-python3; then
         apt-get install -y python-is-python3
+        type python3
     else
         apt-get install -y python-minimal
+        type python
     fi
 fi
 
@@ -99,9 +101,10 @@ if is_centos8; then
     echo "Install python38"
     dnf clean all
     dnf install -y python38
+    python3 -V
+    type python3
 fi
 
-type python3
 
 # Ansible requires sudo so ensure it is available.
 if ! command -v sudo; then
diff --git a/releasenotes/notes/upgrade-git236-f11b0f4928dbd428.yaml b/releasenotes/notes/upgrade-git236-f11b0f4928dbd428.yaml
new file mode 100644 (file)
index 0000000..19ffc61
--- /dev/null
@@ -0,0 +1,4 @@
+---
+upgrade:
+  - |
+    Upgrade git v2.36 on CentOS 7.