1
0
mirror of https://github.com/rancher/os.git synced 2025-08-31 14:23:11 +00:00

Move Packet datasource from cloud-init-pre to cloud-init

This commit is contained in:
Josh Curl
2016-09-27 11:18:24 -07:00
parent 5987d713a4
commit 395ef0b8c4
2 changed files with 7 additions and 19 deletions

View File

@@ -108,6 +108,11 @@ func currentDatasource() (datasource.Datasource, error) {
}
ds := selectDatasource(dss)
if ds.Type() == "packet-metadata-service" {
enablePacketNetwork(&cfg.Rancher)
}
return ds, nil
}
@@ -220,10 +225,9 @@ func getDatasources(cfg *rancherConfig.CloudConfig) []datasource.Datasource {
dss = append(dss, gce.NewDatasource("http://metadata.google.internal/"))
}
case "packet":
if !network {
enablePacketNetwork(&cfg.Rancher)
if network {
dss = append(dss, packet.NewDatasource("https://metadata.packet.net/"))
}
dss = append(dss, packet.NewDatasource("https://metadata.packet.net/"))
}
}