diff options
| author | omnom62 <75066712+omnom62@users.noreply.github.com> | 2026-05-02 08:26:17 +1000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-02 08:26:17 +1000 |
| commit | c3d68af3525509930acb5f843d9456011f8460ca (patch) | |
| tree | 54d3b713bbc47118f033abd11c31a106b8aa10c1 /plugins/modules | |
| parent | 785096c533d6ad3f11efcb6e8de0fc446547b1c4 (diff) | |
| parent | a2ee09579a75165ae691efcbf3e952db83145b83 (diff) | |
| download | vyos.vyos-dependabot/github_actions/ansible/team-devtools/dot-github/workflows/ah_token_refresh.yml-26.4.0.tar.gz vyos.vyos-dependabot/github_actions/ansible/team-devtools/dot-github/workflows/ah_token_refresh.yml-26.4.0.zip | |
Merge branch 'main' into dependabot/github_actions/ansible/team-devtools/dot-github/workflows/ah_token_refresh.yml-26.4.0dependabot/github_actions/ansible/team-devtools/dot-github/workflows/ah_token_refresh.yml-26.4.0
Diffstat (limited to 'plugins/modules')
| -rw-r--r-- | plugins/modules/vyos_vlan.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/plugins/modules/vyos_vlan.py b/plugins/modules/vyos_vlan.py index f0b68bc9..9d23cc7c 100644 --- a/plugins/modules/vyos_vlan.py +++ b/plugins/modules/vyos_vlan.py @@ -279,15 +279,11 @@ def map_config_to_obj(module): obj = {} eth = splitted_line[0].strip("'") - if eth.startswith("eth"): + if eth.startswith("eth") and "." in eth: obj["interfaces"] = [] - if "." in eth: - interface = eth.split(".")[0] - obj["interfaces"].append(interface) - obj["vlan_id"] = eth.split(".")[-1] - else: - obj["interfaces"].append(eth) - obj["vlan_id"] = None + interface = eth.split(".")[0] + obj["interfaces"].append(interface) + obj["vlan_id"] = eth.split(".")[-1] if splitted_line[1].strip("'") != "-": obj["address"] = splitted_line[1].strip("'") |
