CI: Fix robot images to build with CentOS7/8 64/102064/1
authorAnil Belur <abelur@linuxfoundation.org>
Fri, 12 Aug 2022 09:27:03 +0000 (19:27 +1000)
committerAnil Belur <abelur@linuxfoundation.org>
Fri, 12 Aug 2022 09:29:11 +0000 (19:29 +1000)
Issue-ID: LF-JIRA RELENG-4365
Signed-off-by: Anil Belur <abelur@linuxfoundation.org>
Change-Id: Ib40b61526591303f3c0f0b2b19e513f22817c1f0

packer/provision/robot.yaml

index eb76e7b2acedadb618f7bd5b5fea74ab33220985..8eb8b1887b261721dfa19348d345011139ccdd32 100644 (file)
@@ -9,7 +9,7 @@
     - include_role: name=lfit.system-update
 
   tasks:
-    - name: Install robot dependencies
+    - name: Install robot dependencies on CentOS 7
       yum:
         name:
           - postgresql-devel
           - python36-pip
         state: present
       become: true
+      when:
+        - ansible_facts['distribution_major_version'] is version('8', '<')
+
+    - name: Install robot dependencies on CentOS 8
+      yum:
+        name:
+          - postgresql-devel
+          - python3-docker
+          - python3-matplotlib
+          - python3-netaddr
+          - python38-pip
+        state: present
+      become: true
+      when:
+        - ansible_facts['distribution_major_version'] is version('8', '>=')
 
     - name: Install dlux dependencies
       block:
               - libpcap-devel
               - libxml2-devel
               - libxslt-devel
+            state: present
+          become: true
+
+        - name: Install lispflowmapping dependencies for CentOS 7
+          yum:
+            name:
               - python-docker-py
               - python-netaddr
             state: present
           become: true
+          when:
+            - ansible_facts['distribution_major_version'] is version('8', '<')
+
+        - name: Install lispflowmapping dependencies for CentOS 8
+          yum:
+            name:
+              - python3-docker
+              - python3-netaddr
+            state: present
+          become: true
+          when:
+            - ansible_facts['distribution_major_version'] is version('8', '>=')
+
         - name: Install udpreplay
           block:
             - name: Fetch udpreplay git repo