Skip to content

Commit

Permalink
[networking] List contents of netplan configuration dirs
Browse files Browse the repository at this point in the history
If a user uses `.yml` for a netplan configuration file, netplan
silently ignores it. This at least gives us better visibility without
needing to worry about obfuscating the contents of other (possibly
malformatted) files.

Signed-off-by: Wesley Hershberger <wesley.hershberger@canonical.com>
  • Loading branch information
MggMuggins committed Feb 26, 2025
1 parent 456faaf commit 3ee1e86
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions sos/report/plugins/networking.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,14 @@ def setup(self):
"/run/systemd/network"
])

# Netplan only consumes files with the `.yaml` extension (LP#1815734),
# so give visibility on other files that might be present.
self.add_dir_listing([
"/etc/netplan",
"/lib/netplan",
"/run/netplan",
])

def postproc(self):

self.do_path_regex_sub(
Expand Down

0 comments on commit 3ee1e86

Please sign in to comment.