Fix: Conditional install outdated deps 85/140785/1
authorAnil Belur <abelur@linuxfoundation.org>
Thu, 24 Apr 2025 09:35:34 +0000 (19:35 +1000)
committerAnil Belur <abelur@linuxfoundation.org>
Thu, 24 Apr 2025 09:38:42 +0000 (19:38 +1000)
Some deps/versions are unavailable on latest platforms
therefore install them conditionally if the platform version matches.

Issue-ID: CIMAN-33
Change-Id: Ic8aa93e6112d8fc27cc35aebc3848d63ded2a736
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
packer/provision/local-builder.yaml

index c12259f..125066c 100644 (file)
@@ -30,7 +30,7 @@
           - gcc
           - python3-venv
       become: true
-      when: ansible_distribution == 'Ubuntu'
+      when: ansible_distribution == 'Ubuntu' and ansible_distribution_version <= '18.04'
 
     - name: Install Python 3.7
       apt:
@@ -39,7 +39,7 @@
           - python3.7-dev
           - python3.7-tk
       become: true
-      when: ansible_distribution == 'Ubuntu'
+      when: ansible_distribution == 'Ubuntu' and ansible_distribution_version <= '18.04'
 
     - name: Install Python 3.8
       apt:
@@ -48,7 +48,7 @@
           - python3.8-dev
           - python3.8-tk
       become: true
-      when: ansible_distribution == 'Ubuntu'
+      when: ansible_distribution == 'Ubuntu' and ansible_distribution_version <= '18.04'
 
     - name: Install Python 3.9
       apt:
@@ -58,7 +58,7 @@
           - python3.9-tk
           - python3.9-distutils
       become: true
-      when: ansible_distribution == 'Ubuntu'
+      when: ansible_distribution == 'Ubuntu' and ansible_distribution_version <= '18.04'
 
     - name: Install libssl1.0-dev dep
       apt:
           command: node --version
         - name: "Check npm version"
           command: npm --version
-      when: ansible_distribution == 'Ubuntu'
+      when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '20.04'
 
     - name: Install npm build tools
       apt:
         update_cache: true
         state: fixed
       become: true
-      when: ansible_distribution == 'Ubuntu'
+      when: ansible_distribution == 'Ubuntu' and ansible_distribution_version == '20.04'
 
     - name: Install enchant2 package for Ubuntu 20.04
       apt: