fix 🐛: Fix typo and add condition for bond0 backing
Some checks failed
ansible-lint / Ansible Lint (push) Failing after 10s

This commit fixes a typo in the `update_cache` value and adds a conditional check to ensure proper handling of `bond0` backing.
This commit is contained in:
2025-12-24 07:37:56 +01:00
parent 4b7e3bd74b
commit 8c1f0b14d2

View File

@@ -6,7 +6,7 @@
ansible.builtin.apt: ansible.builtin.apt:
name: ethtool name: ethtool
state: present state: present
update_cache: yes update_cache: true
# ============================================================ # ============================================================
# Normalize and validate configuration # Normalize and validate configuration
@@ -103,6 +103,7 @@
label: "{{ item }}" label: "{{ item }}"
- name: Check for bond0 backing - name: Check for bond0 backing
when: bond_info.rc == 0
block: block:
- name: Detect if any bridge is backed by bond0 - name: Detect if any bridge is backed by bond0
ansible.builtin.set_fact: ansible.builtin.set_fact:
@@ -115,7 +116,6 @@
(bond_info.stdout | regex_findall('Slave Interface: ([a-zA-Z0-9]+)')) | list (bond_info.stdout | regex_findall('Slave Interface: ([a-zA-Z0-9]+)')) | list
}} }}
when: wol_has_bond0 | default(false) when: wol_has_bond0 | default(false)
when: bond_info.rc == 0
# ============================================================ # ============================================================
# Validate configuration and resolve to physical NICs # Validate configuration and resolve to physical NICs