Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix regex for DCQCN #54

Merged
merged 1 commit into from
Oct 25, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions roles/configure_dcqcn/tasks/configure_dcqcn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@
loop_control:
label: "{{ item.item.ibdev }}"
vars:
found_setting: "{{ item.stdout | regex_search('ROCE_CC_PRIO_MASK_P1 +([^ ]+)','\\1') | first }}"
when: found_setting != dcqcn_roce_cc_prio_mask_p1 | string
mlx_re: 'ROCE_CC_PRIO_MASK_P1 +([^ ]+)'
when:
- item.stdout is regex(mlx_re)
- item.stdout | regex_search(mlx_re,'\\1') | first != dcqcn_roce_cc_prio_mask_p1 | string
notify: Reboot system - dcqcn
become: true

Expand All @@ -55,8 +57,10 @@
loop_control:
label: "{{ item.item.ibdev }}"
vars:
found_setting: "{{ item.stdout | regex_search('CNP_DSCP_P1 +([^ ]+)','\\1') | first }}"
when: found_setting != dcqcn_cnp_dscp_p1 | string
mlx_re: 'CNP_DSCP_P1 +([^ ]+)'
when:
- item.stdout is regex(mlx_re)
- item.stdout | regex_search(mlx_re,'\\1') | first != dcqcn_cnp_dscp_p1 | string
notify: Reboot system - dcqcn
become: true

Expand All @@ -66,8 +70,10 @@
loop_control:
label: "{{ item.item.ibdev }}"
vars:
found_setting: "{{ item.stdout | regex_search('CNP_802P_PRIO_P1 +([^ ]+)','\\1') | first }}"
when: found_setting != dcqcn_cnp_802p_prio_p1 | string
mlx_re: 'CNP_802P_PRIO_P1 +([^ ]+)'
when:
- item.stdout is regex(mlx_re)
- item.stdout | regex_search(mlx_re,'\\1') | first != dcqcn_cnp_802p_prio_p1 | string
notify: Reboot system - dcqcn
become: true

Expand Down