Might be slightly cleaner to do:
```
IpFamily = case envy:get(chef_index, enable_ipv6, false, boolean) of
                true -> [ipv6, ipv4],
                false -> [ipv4]
                end,
envy_parse:to_ip(Host, IpFamily)
```