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, []) }}"
25 - name: set build env vars
28 RTE_SDK: "{{ RTE_SDK }}"
29 RTE_TARGET: "{{ RTE_TARGET }}"
30 VNF_CORE: "{{ samplevnf_path }}"
32 - name: set soft CRC and GEN_DECAP_IPV6_TO_IPV4_CKSUM for PROX when building in VM
34 build_env_vars: "{{ build_env_vars|combine({'crc': 'soft'})|combine({'GEN_DECAP_IPV6_TO_IPV4_CKSUM':'y'}) }}"
35 when: vnf_name == "PROX" and image_type is defined and image_type == "vm"
37 - name: "make {{ vnf_name }} clean"
38 command: make -j {{ ansible_processor_vcpus }} clean
40 chdir: "{{ vnf_build_dir }}"
41 environment: "{{ build_env_vars }}"
43 - name: "make {{ vnf_name }}"
44 command: make -j {{ ansible_processor_vcpus }}
46 chdir: "{{ vnf_build_dir }}"
47 environment: "{{ build_env_vars }}"
49 #- command: cp "{{ vnf_build_dir }}/{{ vnf_name }}/build/ip_pipeline" "{{ INSTALL_BIN_PATH }}/vACL_vnf"
51 - name: "Install {{ vnf_name }} VNF"
53 src: "{{ vnf_build_dir }}/build/{{ vnf_app_name }}"
54 dest: "{{ INSTALL_BIN_PATH }}/{{ vnf_app_name }}"