From b30de90f8a828570ffc907fee2e653a2fe73d491 Mon Sep 17 00:00:00 2001 From: tvasilopo <tvasilopo@noc.grnet.gr> Date: Wed, 9 Aug 2023 07:29:00 +0000 Subject: [PATCH] ansible lint --- roles/check_demarcation_point/tasks/checks.yaml | 2 +- roles/check_demarcation_point/tasks/compare.yaml | 2 +- roles/check_demarcation_point/tasks/create_file.yaml | 4 ++-- roles/check_demarcation_point/tasks/get_ifstatus.yaml | 11 +++++++---- .../vars/optical_thresholds.yml | 2 +- 5 files changed, 12 insertions(+), 9 deletions(-) diff --git a/roles/check_demarcation_point/tasks/checks.yaml b/roles/check_demarcation_point/tasks/checks.yaml index 5ddca306..66dfc008 100644 --- a/roles/check_demarcation_point/tasks/checks.yaml +++ b/roles/check_demarcation_point/tasks/checks.yaml @@ -91,4 +91,4 @@ - "{{ verb }}.{{ check_id }}.rx_signal_avg_power_dbm < {{ max_rx_power_dbm }}" fail_msg: "FAIL: High Rx signal power detected (dBm)" success_msg: "PASS: Rx signal power below maximum threshold (dBm) " - failed_when: false \ No newline at end of file + failed_when: false diff --git a/roles/check_demarcation_point/tasks/compare.yaml b/roles/check_demarcation_point/tasks/compare.yaml index 6785bf75..e378f71f 100644 --- a/roles/check_demarcation_point/tasks/compare.yaml +++ b/roles/check_demarcation_point/tasks/compare.yaml @@ -76,4 +76,4 @@ when: - pre_check[check_id] is defined - post_check[check_id] is defined - - file_status.stat.exists \ No newline at end of file + - file_status.stat.exists diff --git a/roles/check_demarcation_point/tasks/create_file.yaml b/roles/check_demarcation_point/tasks/create_file.yaml index 3c3d7f23..c4a1ba36 100644 --- a/roles/check_demarcation_point/tasks/create_file.yaml +++ b/roles/check_demarcation_point/tasks/create_file.yaml @@ -5,7 +5,7 @@ path: roles/check_demarcation_point/vars/{{ check_id }}.yml register: file_status -- name: Creating a yaml file with pre_check results content +- name: Creating a yaml file with pre_check results content ansible.builtin.copy: content: | {{ '---' }} @@ -46,4 +46,4 @@ {{ 'rx_signal_avg_power_dbm:' }} {{ rx_signal_avg_power_dbm }} when: - verb == 'post_check' - - file_status.stat.exists \ No newline at end of file + - file_status.stat.exists diff --git a/roles/check_demarcation_point/tasks/get_ifstatus.yaml b/roles/check_demarcation_point/tasks/get_ifstatus.yaml index f02173cf..642bebf3 100644 --- a/roles/check_demarcation_point/tasks/get_ifstatus.yaml +++ b/roles/check_demarcation_point/tasks/get_ifstatus.yaml @@ -34,10 +34,13 @@ interface_status.stdout_lines.0['interface-information'] .0['physical-interface'].0['output-error-count'].0['data'] | default(False) }} - ethernet_pcs_statistics_bit_error_secs: "{{ interface_status.stdout_lines.0['interface-information'].0['physical-interface'].0['ethernet-pcs-statistics'].0['bit-error-seconds'].0['data'] - | default(False) }}" - ethernet_pcs_statistics_errored_blocks_secs: "{{ interface_status.stdout_lines.0['interface-information'].0['physical-interface'].0['ethernet-pcs-statistics'].0['errored-blocks-seconds'].0['data'] - | default(False) }}" + ethernet_pcs_statistics_bit_error_secs: >- + "{{ interface_status.stdout_lines.0['interface-information'].0['physical-interface'] + .0['ethernet-pcs-statistics'].0['bit-error-seconds'].0['data']| default(False) + }}" + ethernet_pcs_statistics_errored_blocks_secs: >- + "{{ interface_status.stdout_lines.0['interface-information'].0['physical-interface'] + .0['ethernet-pcs-statistics'].0['errored-blocks-seconds'].0['data']| default(False) }}" ethernet_fec_statistics: "{{ interface_status.stdout_lines.0['interface-information'].0['physical-interface'].0['ethernet-fec-statistics'].0 | default(False) }}" when: vendor == 'juniper' diff --git a/roles/check_demarcation_point/vars/optical_thresholds.yml b/roles/check_demarcation_point/vars/optical_thresholds.yml index d3d8d5ae..2c496bca 100644 --- a/roles/check_demarcation_point/vars/optical_thresholds.yml +++ b/roles/check_demarcation_point/vars/optical_thresholds.yml @@ -10,4 +10,4 @@ fec_ccw_error_rate_threshold: 0 fec_nccw_count_threshold: 0 fec_nccw_error_rate_threshold: 0 pcs_bit_error_seconds_threshold: 20 -pcs_bit_error_blocks_seconds_threshold: 20 \ No newline at end of file +pcs_bit_error_blocks_seconds_threshold: 20 -- GitLab