Merge "Add required deps for devstack rocky"
[releng/builder.git] / packer / provision / mininet-ovs-2.6.yaml
index 6715b38e3cea6560bd9d6e85f138464f6a81f533..5e149c8a2a6d979c5344b424491ebceffcf3fc28 100644 (file)
     - name: 'Install OpenVSwitch {{ovs_version}}'
       block:
         - name: 'Install dependencies required for OpenVSwitch {{ovs_version}}'
-          apt: 'name={{item}} state=present'
-          with_items:
-            - dh-autoreconf
-            - debhelper
-            - autoconf
-            - automake
-            - libssl-dev
-            - pkg-config
-            - bzip2
-            - openssl
-            - python-all
-            - procps
-            - python-qt4
-            - python-zopeinterface
-            - python-twisted-conch
+          apt:
+            name:
+              - dh-autoreconf
+              - debhelper
+              - autoconf
+              - automake
+              - libssl-dev
+              - pkg-config
+              - bzip2
+              - openssl
+              - python-all
+              - procps
+              - python-qt4
+              - python-zopeinterface
+              - python-twisted-conch
+            state: present
           become: true
         - name: Create OVS root
           file:
-            path: /tmp/ovs
+            path: /opt/ovs
             state: directory
             mode: 0755
+          become: true
         - name: 'Fetch OpenVSwitch {{ovs_version}} to /tmp'
           get_url:
             url: 'http://openvswitch.org/releases/openvswitch-2.6.1.tar.gz'
         - name: 'Unarchive OpenVSwitch {{ovs_version}}'
           unarchive:
             src: '/tmp/openvswitch-{{ovs_version}}.tar.gz'
-            dest: /tmp/ovs
+            dest: /opt/ovs
             remote_src: true
+          become: true
         - name: 'Build OpenVSwitch {{ovs_version}}'
           shell: DEB_BUILD_OPTIONS='parallel=8 nocheck' fakeroot debian/rules binary
           args:
-            chdir: '/tmp/ovs/openvswitch-{{ovs_version}}'
+            chdir: '/opt/ovs/openvswitch-{{ovs_version}}'
+          become: true
         - name: 'Install OpenVSwitch {{ovs_version}}'
           apt: 'deb={{item}}'
           with_items:
-            - /tmp/ovs/openvswitch-common_2.6.1-1_amd64.deb
-            - /tmp/ovs/openvswitch-switch_2.6.1-1_amd64.deb
-            - /tmp/ovs/python-openvswitch_2.6.1-1_all.deb
-            - /tmp/ovs/openvswitch-vtep_2.6.1-1_amd64.deb
+            - /opt/ovs/openvswitch-common_2.6.1-1_amd64.deb
+            - /opt/ovs/openvswitch-switch_2.6.1-1_amd64.deb
+            - /opt/ovs/python-openvswitch_2.6.1-1_all.deb
+            - /opt/ovs/openvswitch-vtep_2.6.1-1_amd64.deb
           become: true
         - name: Enable openvswitch-switch service
           systemd: