1 # Copyright (c) 2017 Intel Corporation
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
16 vnf_build_dir: "{{ samplevnf_path }}/VNFs/{{ vnf_build_dirs[vnf_name] }}"
19 vnf_app_name: "{{ vnf_app_names[vnf_name] }}"
21 - name: Install extra build dependencies
22 action: "{{ ansible_pkg_mgr }} name={{ item }} state=present"
23 with_items: "{{ vnf_build_dependencies.get(vnf_name, {}).get(ansible_os_family, []) }}"
26 - name: set build env vars
29 RTE_SDK: "{{ RTE_SDK }}"
30 RTE_TARGET: "{{ RTE_TARGET }}"
31 VNF_CORE: "{{ samplevnf_path }}"
33 - name: set soft CRC for PROX when building in VM
35 build_env_vars: "{{ build_env_vars|combine({'crc': 'soft'}) }}"
36 when: vnf_name == "PROX" and image_type is defined and image_type == "vm"
38 - name: "make {{ vnf_name }} clean"
39 command: make -j {{ ansible_processor_vcpus }} clean
41 chdir: "{{ vnf_build_dir }}"
42 environment: "{{ build_env_vars }}"
44 - name: "make {{ vnf_name }}"
45 command: make -j {{ ansible_processor_vcpus }}
47 chdir: "{{ vnf_build_dir }}"
48 environment: "{{ build_env_vars }}"
50 #- command: cp "{{ vnf_build_dir }}/{{ vnf_name }}/build/ip_pipeline" "{{ INSTALL_BIN_PATH }}/vACL_vnf"
52 - name: "Install {{ vnf_name }} VNF"
54 src: "{{ vnf_build_dir }}/build/{{ vnf_app_name }}"
55 dest: "{{ INSTALL_BIN_PATH }}/{{ vnf_app_name }}"