This commit is contained in:
parent
e9cd1521fb
commit
fe3a28f84b
@ -82,6 +82,11 @@ func CreateNewAgent(cfg *config.Config) (*hcloud.Server, error) {
|
|||||||
return nil, errors.New(fmt.Sprintf("Could not parse agent spec: %s", err.Error()))
|
return nil, errors.New(fmt.Sprintf("Could not parse agent spec: %s", err.Error()))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
networkConf := hcloud.ServerCreatePublicNet{
|
||||||
|
EnableIPv4: false,
|
||||||
|
EnableIPv6: true,
|
||||||
|
}
|
||||||
|
|
||||||
res, _, err := client.Server.Create(context.Background(), hcloud.ServerCreateOpts{
|
res, _, err := client.Server.Create(context.Background(), hcloud.ServerCreateOpts{
|
||||||
Name: name,
|
Name: name,
|
||||||
ServerType: pln,
|
ServerType: pln,
|
||||||
@ -92,6 +97,7 @@ func CreateNewAgent(cfg *config.Config) (*hcloud.Server, error) {
|
|||||||
UserData: userdata,
|
UserData: userdata,
|
||||||
StartAfterCreate: utils.BoolPointer(true),
|
StartAfterCreate: utils.BoolPointer(true),
|
||||||
Labels: labels,
|
Labels: labels,
|
||||||
|
PublicNet: &networkConf,
|
||||||
})
|
})
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user