network/tests/tasks/get_current_interfaces.yml
Noriko Hosoi 34665b916d Cleaning up ansible-lint errors except '106', '303' and '403'
That is the following errors are fixed.
'206'  # Variables should have spaces before and after: {{ var_name }}
'208'  # File permissions unset or incorrect
'301'  # Commands should not change things if nothing needs doing
'305'  # Use shell only when shell functionality is required
'502'  # All tasks should be named
'601'  # Don't compare to literal True/False
'602'  # Don't compare to empty string

RHELPLAN-73471

Signed-off-by: Noriko Hosoi <nhosoi@redhat.com>
2021-04-15 20:53:53 +02:00

11 lines
295 B
YAML

# SPDX-License-Identifier: BSD-3-Clause
---
- name: Gather current interface info
command: ls -1
args:
chdir: /sys/class/net
register: _current_interfaces
changed_when: false
- name: Set current_interfaces
set_fact:
current_interfaces: "{{ _current_interfaces.stdout_lines }}"