mirror of
https://github.com/linux-system-roles/network.git
synced 2026-07-19 01:17:00 +00:00
ansible_interfaces requires iproute to be present which might not be the case for container images. Check /sys/class/net to avoid the dependency.
9 lines
241 B
YAML
9 lines
241 B
YAML
# SPDX-License-Identifier: BSD-3-Clause
|
|
---
|
|
- name: "Get stat for interface {{ interface }}"
|
|
stat:
|
|
get_attributes: false
|
|
get_checksum: false
|
|
get_mime: false
|
|
path: "/sys/class/net/{{ interface }}"
|
|
register: interface_stat
|