fix: handle skipping
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
15d1e9dee0
commit
190c1033e6
|
@ -194,15 +194,20 @@ func autoConfigure(c *cli.Context, provider *gandi.Provider, zone string) error
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
discovered := false
|
||||||
for _, existingRecord := range existingRecords {
|
for _, existingRecord := range existingRecords {
|
||||||
if existingRecord.Type == record.Type &&
|
if existingRecord.Type == record.Type &&
|
||||||
existingRecord.Name == record.Name &&
|
existingRecord.Name == record.Name &&
|
||||||
existingRecord.Value == record.Value {
|
existingRecord.Value == record.Value {
|
||||||
logrus.Warnf("%v for %s already exists?", record, zone)
|
logrus.Warnf("%s record: %s %s for %s already exists?", record.Type, record.Name, record.Value, zone)
|
||||||
continue
|
discovered = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if discovered {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
createdRecords, err := provider.SetRecords(
|
createdRecords, err := provider.SetRecords(
|
||||||
c.Context,
|
c.Context,
|
||||||
zone,
|
zone,
|
||||||
|
|
Loading…
Reference in New Issue