From 7fd380c1910a8f74f10315d6c5ee8ce6e994dbb5 Mon Sep 17 00:00:00 2001 From: Anil Belur Date: Thu, 24 Apr 2025 19:35:34 +1000 Subject: [PATCH] Fix: Conditional install outdated deps 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 --- packer/provision/local-builder.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/packer/provision/local-builder.yaml b/packer/provision/local-builder.yaml index c12259f5d..125066c17 100644 --- a/packer/provision/local-builder.yaml +++ b/packer/provision/local-builder.yaml @@ -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: @@ -122,7 +122,7 @@ 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: @@ -130,7 +130,7 @@ 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: -- 2.16.6