Skip to content
This repository has been archived by the owner on Dec 16, 2020. It is now read-only.

new versions of rspec-puppet-facts can have no ipaddress_eth0 fact #56

Open
igalic opened this issue Nov 27, 2016 · 0 comments
Open

new versions of rspec-puppet-facts can have no ipaddress_eth0 fact #56

igalic opened this issue Nov 27, 2016 · 0 comments
Milestone

Comments

@igalic
Copy link
Collaborator

igalic commented Nov 27, 2016

Depending on the version of facter and the OS it is run under, rspec-puppet-facts may come without an ipaddress_eth0 fact.

This can cause a great number of our tests to fail.

I'm not sure what the solution here is, since there's no clear progression to facter 3 style structured facts that give us the networking group:

{
  "dhcp": "192.168.1.1",
  "fqdn": "sinix",
  "hostname": "sinix",
  "interfaces": {
    "lo": {
      "bindings": [
        {
          "address": "127.0.0.1",
          "netmask": "255.0.0.0",
          "network": "127.0.0.0"
        }
      ],
      "bindings6": [
        {
          "address": "::1",
          "netmask": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff",
          "network": "::1"
        }
      ],
      "ip": "127.0.0.1",
      "ip6": "::1",
      "mtu": 65536,
      "netmask": "255.0.0.0",
      "netmask6": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff",
      "network": "127.0.0.0",
      "network6": "::1"
    },
    "wlp4s0": {
      "bindings": [
        {
          "address": "192.168.1.131",
          "netmask": "255.255.255.0",
          "network": "192.168.1.0"
        }
      ],
      "bindings6": [
        {
          "address": "fe80::d1ca:8b89:40d5:f5be",
          "netmask": "ffff:ffff:ffff:ffff::",
          "network": "fe80::"
        }
      ],
      "dhcp": "192.168.1.1",
      "ip": "192.168.1.131",
      "ip6": "fe80::d1ca:8b89:40d5:f5be",
      "mac": "f8:16:54:67:5c:37",
      "mtu": 1500,
      "netmask": "255.255.255.0",
      "netmask6": "ffff:ffff:ffff:ffff::",
      "network": "192.168.1.0",
      "network6": "fe80::"
    }
  },
  "ip": "192.168.1.131",
  "ip6": "fe80::d1ca:8b89:40d5:f5be",
  "mac": "f8:16:54:67:5c:37",
  "mtu": 1500,
  "netmask": "255.255.255.0",
  "netmask6": "ffff:ffff:ffff:ffff::",
  "network": "192.168.1.0",
  "network6": "fe80::",
  "primary": "wlp4s0"
}

facter2 facts, even when structured, don't come with that group at all, making it more difficult to find the primary interface.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants