X-Git-Url: https://gerrit.akraino.org/r/gitweb?p=ta%2Finfra-ansible.git;a=blobdiff_plain;f=roles%2Fsriovdp_config%2Ftasks%2Fmain.yaml;h=54e76dfe50a9f5e436b5f36b7aa57691693218d6;hp=3440c825c066b91d0e60bdd995b032d8bab1bfcc;hb=d8894a8c996772f02c27f6b03ac438f42c96cbed;hpb=7385fe7b00e999a7c89edf0523708563c7947b17 diff --git a/roles/sriovdp_config/tasks/main.yaml b/roles/sriovdp_config/tasks/main.yaml index 3440c82..54e76df 100644 --- a/roles/sriovdp_config/tasks/main.yaml +++ b/roles/sriovdp_config/tasks/main.yaml @@ -15,7 +15,7 @@ # limitations under the License. - name: collect network device PCI addresses - shell: dpdk-devbind --status-dev net | grep "^0000.*if=en" + shell: dpdk-devbind --status-dev net | egrep "^[0-9a-fA-F]{4}\b.*if=" || true register: devbind - set_fact: @@ -23,7 +23,7 @@ iface: [] - set_fact: - pci: "{{ pci }} + {{ [ item.split()[0][5:12] ] }}" + pci: "{{ pci }} + {{ [ item.split()[0][:12] ] }}" iface: "{{ iface }} + {{ [ item.split(' if=')[1].split()[0] ] }}" with_items: "{{ devbind.stdout_lines }}"