Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fact gathering gets a slightly unhelpful media type value on OS X, ending in a '>' #11046

Closed
CharlesFerguson opened this issue May 21, 2015 · 0 comments · Fixed by #11103
Closed
Labels
bug This issue/PR relates to a bug.

Comments

@CharlesFerguson
Copy link

Issue Type:

Bug Report

Ansible Version:

charles-mba:ansible charles$ ansible --version
ansible 1.9.1
configured module search path = None

Ansible Configuration:

No changes to the standard configuration.

Environment:

Running from OS X against OS X.

Summary:

When facts are obtained from an OS X system, the variable ansible_en0.media_type (and possibly other interfaces) is returned with a trailing '>' character.

Steps To Reproduce:
  1. On OS X system: 'ansible -m setup -i hosts localhost | less'
  2. find ansible_en0 in the displayed output.
Expected Results:

The 'media_type' field should be 'full-duplex', not 'full-duplex>'.

It looks like the output from 'networksetup -getmedia en0' isn't being truncated to report the trailing flags separator. For example:

osx:~ builduk$ networksetup -getmedia en0
Current: 1000baseT <full-duplex>
Active: 1000baseT <full-duplex>
Actual Results:
    "ansible_en0": {
        "device": "en0", 
        "flags": [
            "UP", 
            "BROADCAST", 
            "SMART", 
            "RUNNING", 
            "SIMPLEX", 
            "MULTICAST"
        ], 
        "ipv4": [
            {
                "address": "xxx", 
                "broadcast": "xxx", 
                "netmask": "xxx", 
                "network": "xxx"
            }
        ], 
        "ipv6": [
            {
                "address": "xxx%en0", 
                "prefix": "64", 
                "scope": "0x4"
            }
        ], 
        "macaddress": "xxx", 
        "media": "Unknown", 
        "media_select": "1000baseT", 
        "media_type": "full-duplex>", 
        "mtu": "1500", 
        "options": [
            "PERFORMNUD"
        ], 
        "status": "active", 
        "type": "unknown"
    }, 

(private informatin hidden with 'xxx')

bcoca pushed a commit that referenced this issue Jun 1, 2015
@ansibot ansibot added bug This issue/PR relates to a bug. and removed bug_report labels Mar 6, 2018
@ansible ansible locked and limited conversation to collaborators Apr 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug This issue/PR relates to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants