diff options
author | Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> | 2018-07-11 16:33:46 +0100 |
---|---|---|
committer | Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> | 2018-07-12 15:34:01 +0000 |
commit | a89e1737d628885f6a208eac5a4d6c22327011ae (patch) | |
tree | 20e32f0490a20b91daf8aeb790623ae31c7f122b /ansible/roles/install_dpdk | |
parent | 438f7b5100e05ed668a0ea90674008a391eb5784 (diff) |
"install_dpdk" ansible role fails if DPDK version has revision number
In [1], the DPDK version string is converted to a number to be compared.
If DPDK version format is "major.minor.revision", this conversion will fail.
[1] https://github.com/opnfv/yardstick/blob/master/ansible/roles/install_dpdk/tasks/main.yml#L119
JIRA: YARDSTICK-1306
Change-Id: Id8d32f28627ff5a0ff8d4fb604282ba2d9931c25
Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
Diffstat (limited to 'ansible/roles/install_dpdk')
-rw-r--r-- | ansible/roles/install_dpdk/tasks/main.yml | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ansible/roles/install_dpdk/tasks/main.yml b/ansible/roles/install_dpdk/tasks/main.yml index 5bcfb50b1..f89a43cae 100644 --- a/ansible/roles/install_dpdk/tasks/main.yml +++ b/ansible/roles/install_dpdk/tasks/main.yml @@ -114,9 +114,16 @@ path: "{{ INSTALL_BIN_PATH }}" state: directory +- set_fact: + major: "{{ dpdk_version.split('.')[0] }}" + minor: "{{ dpdk_version.split('.')[1] }}" + +- set_fact: + major_minor_version: "{{ major }}.{{ minor }}" + - name: copy dpdk-devbind.py to correct location copy: - src: "{{ dpdk_devbind_usertools if dpdk_version|float >= 17.02 else dpdk_devbind_tools }}" + src: "{{ dpdk_devbind_usertools if major_minor_version|float >= 17.02 else dpdk_devbind_tools }}" dest: "{{ INSTALL_BIN_PATH }}/dpdk-devbind.py" remote_src: yes force: yes |