mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-27 07:01:22 -07:00
Merge pull request #11113 from sysadmin75/11104_osx_facts_bridge
Fixes OSX fact gathering for the bridge interface.
This commit is contained in:
commit
a584ab3420
1 changed files with 7 additions and 1 deletions
|
@ -2402,6 +2402,12 @@ class DarwinNetwork(GenericBsdIfconfigNetwork, Network):
|
||||||
current_if['media'] = 'Unknown' # Mac does not give us this
|
current_if['media'] = 'Unknown' # Mac does not give us this
|
||||||
current_if['media_select'] = words[1]
|
current_if['media_select'] = words[1]
|
||||||
if len(words) > 2:
|
if len(words) > 2:
|
||||||
|
# MacOSX sets the media to '<unknown type>' for bridge interface
|
||||||
|
# and parsing splits this into two words; this if/else helps
|
||||||
|
if words[1] == '<unknown' and words[2] == 'type>':
|
||||||
|
current_if['media_select'] = 'Unknown'
|
||||||
|
current_if['media_type'] = 'unknown type'
|
||||||
|
else:
|
||||||
current_if['media_type'] = words[2][1:-1]
|
current_if['media_type'] = words[2][1:-1]
|
||||||
if len(words) > 3:
|
if len(words) > 3:
|
||||||
current_if['media_options'] = self.get_options(words[3])
|
current_if['media_options'] = self.get_options(words[3])
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue