Skip to content

Commit

Permalink
Fix sensors_check link (#1611)
Browse files Browse the repository at this point in the history
  • Loading branch information
msosyak authored Apr 27, 2020
1 parent 7825453 commit e7dab70
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 28 deletions.
27 changes: 3 additions & 24 deletions ansible/roles/sonic-common/tasks/sensors_check.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,4 @@
- name: Get platform monitor docker name
shell: docker ps -a --format '{{'{{'}}.Image{{'}} {{'}}.Names{{'}}'}}' | grep 'platform' | awk '{print $2}'
register: pmon_ps

- name: Get platform name
shell: show platform summary | grep Platform | awk '{print $2}'
register: platform

- include_tasks: add_container_to_inventory.yml
- name: run test
include_tasks: roles/test/tasks/pytest_runner.yml
vars:
container_name: "{{ pmon_ps.stdout }}"

- name: Gather sensors
sensors_facts: checks={{ sensors_checks[platform.stdout] }}
delegate_to: "{{ ansible_host }}_{{ pmon_ps.stdout }}"

- name: Output of sensors information
debug: var=vars['sensors']

- name: Assert no alarm
assert: { that: "{{ vars['sensors']['alarm'] }} == False" }

- name: Show warnings
debug: var=vars['sensors']['warnings']
when: vars['sensors']['warning']
test_node: platform/test_sensors.py
5 changes: 1 addition & 4 deletions ansible/roles/test/tasks/sensors_check.yml

0 comments on commit e7dab70

Please sign in to comment.