saltstack-formulas / hostsfile-formula

Use minion IDs to keep /etc/hosts and hostnames consistent for clusters without DNS
http://docs.saltstack.com/en/latest/topics/development/conventions/formulas.html
Other
33 stars 89 forks source link

Added mine alias support. #11

Closed andrew-vant closed 9 years ago

andrew-vant commented 9 years ago

This is useful if you have other states that want to get network.ip_addrs for different interfaces.

iggy commented 9 years ago

I know there's already mine support in this formula, but is there a reason that was added vs just doing the mine lookups in the pillar sls files? That seems more flexible (you can use mine, but don't have to... etc.)

andrew-vant commented 9 years ago

I've never been able to get mine lookup inside pillar to work (and wasn't aware it was supposed to be possible) so the possibility simply didn't cross my mind.

wwentland commented 9 years ago

You can't lookup mine data in pillars IIRC (cf. https://github.com/saltstack/salt/issues/21403 )

andrew-vant commented 9 years ago

Any motion on this?

puneetk commented 9 years ago

does your change work ? I havent tested it, just asking if it works.

andrew-vant commented 9 years ago

Well, it works in my environment, or I wouldn't have put in the PR. I can't technically prove it will work for anyone else, of course.

puneetk commented 9 years ago

Sounds good, @iggy up to you, i think its a good change.

iggy commented 9 years ago

Well, apparently mine lookups in pillar files don't currently work, so let's roll with it for now.

I reserve the right to rip this out later if they get mine-in-pillar working at some point ;)

andrew-vant commented 9 years ago

Fine by me. I don't like baking mine into states either; but if one is stuck with it, it's better for it to be configurable.