customink-webops / hostsfile

Easily manage your hosts file with Chef
Apache License 2.0
155 stars 82 forks source link

Priority is not defined #61

Closed nkadel-skyhook closed 9 years ago

nkadel-skyhook commented 9 years ago

It's entirely unclear whether priority is published as 'higher priority first' or 'lower priority first'. It's also unclear whether "loopback" priority is derived automatically by deteecting existing entries as loopback, or whether they'd have to be formally specified and published with hostsfile to ensure their correct ordering.

This is particularly an issue for hosts where the FQDN is published both as a loopback and as an external machine IP address.

sethvargo commented 9 years ago

Priorities are highest first (so 10 is a higher priority than 4). You can also see how priority is calculated and weighted internally here.

nkadel-skyhook commented 9 years ago

It needs to be in the README.md: source code should not be considered documentation.

Would a patch help?

jdmulloy commented 9 years ago

I've updated the README and submitted Pull Request #71. I added a comment about how the ordering works and changed the numbered list to table. In the raw README the priority numbers matched the source code, but Markdown parsers like the one in GitHub auto-number the list (1, 2, 3, etc.). The table shows the correct numbers, which should help those reading the README on GitHub or in the Supermarket.