File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -84,12 +84,22 @@ def _prep_provision(ctx: Context) -> None:
84
84
_logger .info (f"Provisioning domain: { domconfig .realm } " )
85
85
86
86
dcname = ctx .cli .name or domconfig .dcname
87
+ prov_opts = list (ctx .instance_config .global_options ())
88
+ explicit_ifaces = "interfaces" in dict (prov_opts )
89
+ if domconfig .interface_config .configured and not explicit_ifaces :
90
+ # dynamically select interfaces from the system to pass to the
91
+ # provisioning command
92
+ _logger .info ("Dynamic interface selection enabled" )
93
+ ifaces = addc .filtered_interfaces (domconfig .interface_config )
94
+ _logger .info ("Selected interfaces: %s" , ifaces )
95
+ prov_opts .append (("interfaces" , " " .join (ifaces )))
96
+ prov_opts .append (("bind interfaces only" , "yes" ))
87
97
addc .provision (
88
98
realm = domconfig .realm ,
89
99
domain = domconfig .short_domain ,
90
100
dcname = dcname ,
91
101
admin_password = domconfig .admin_password ,
92
- options = ctx . instance_config . global_options () ,
102
+ options = prov_opts ,
93
103
)
94
104
_merge_config (_provisioned , ctx .instance_config .global_options ())
95
105
You can’t perform that action at this time.
0 commit comments