-
Notifications
You must be signed in to change notification settings - Fork 30
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
Allow interfaces to be configured it ways other than with DHCP. #74
base: master
Are you sure you want to change the base?
Conversation
Hmm, this defers interface setup until configuration file, whereas perhaps it needs to be done earlier at boot strap time. |
The interfaces are already configurable during bootstrap via rc.conf: https://github.com/ployground/bsdploy/blob/master/bsdploy/bootstrap-files/rc.conf |
Is that parametrisable per host? How would I override it differently for different hosts? I'm currently using this patch, with:
|
Just set the I kinda wonder why we don't do it per host automatically yet, I know I discussed it at some point with @tomster |
What worries me about this approach, is that I've got to fork the rc.conf template per host, which means taking responsibility for the reset of the contents in that template. I'd rather not do that, as it's just the interfaces that I want specific configuration for. Can we split those out? |
And, I guess that that means the clone interfaces fix that was merged the other day is now incorrect, as it creates the interfaces too late for the bootstrap to be applied. (That is applied at configuration time, not at bootstrap time). |
No, the cloned_interfaces is correct. Bootstrapping is only meant to get going at all. On EC2 for example we use the plain existing AMIs and only configure them. The rc.conf should be pretty stable for bootstrapping. All further customizations are done via ansible during the configure run. |
Ah, so this interface patch is correct then, because it is used to configure cloned interfaces after boot. But, perhaps you're saying that it's not relevant to bsdploy and should be pulled into my local build? |
yes and no :) currently, we do this in our projects, too i.e. creating custom rc.confs per host. but just like yourself, i too would want to configure the network interfaces without maintaining multiple monolithic instances of rc.conf maybe all that is needed here is to include a custom snippet per host. the default definition of that snippet could be the current interface settings, namely to configure all interfaces via DHCP. if that's not what you want for a particular host you would define it in ploy.conf with whatever you need. something along those lines... |
It seems likely that others will want to apply explicit configuration to interfaces, other than just DHCP. This patch allow that by defining a host variable that allow arbitrary interface configuration:
e.g: