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

Add the possiblity to define extra hosts aliases #821

Open
MartinPotier opened this issue Dec 21, 2017 · 3 comments
Open

Add the possiblity to define extra hosts aliases #821

MartinPotier opened this issue Dec 21, 2017 · 3 comments

Comments

@MartinPotier
Copy link

nixops generates an /etc/hosts referring to all machines by IP. That'd be usefull, in the case of virtualbox instances at least, to be able to declare extra aliases. Using the following fragment:

machineName.deployment.targetExtraAliases = ["alias1" "alias2"];

would generate the following /etc/hosts on machineName:

127.0.0.1  localhost
::1  localhost

…
192.168.xx.xx machineName machineName-unencrypted alias1 alias2
…

Doing so could relieve users from installing and running a local DNS server for the task.

@KamilaBorowska
Copy link
Member

KamilaBorowska commented Oct 12, 2019

It's possible to workaround this by doing this:

{
    networking.extraHosts = "${nodes."NODE NAME".config.networking.privateIPv4} ALIAS";
}

@WhittlesJr
Copy link

+1 and a bump for 2021. It would be nice to get this for free.

@WhittlesJr
Copy link

Actually, to co-opt this a bit, it doesn't seem like nixops is adding the other machines to /etc/hosts at all... is that really supposed to be a feature?

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

No branches or pull requests

3 participants