fix: handle skipping
continuous-integration/drone/push Build is passing Details

This commit is contained in:
decentral1se 2021-12-23 01:46:57 +01:00
parent 15d1e9dee0
commit 190c1033e6
Signed by: decentral1se
GPG Key ID: 03789458B3D0C410
1 changed files with 7 additions and 2 deletions

View File

@ -194,15 +194,20 @@ func autoConfigure(c *cli.Context, provider *gandi.Provider, zone string) error
return err
}
discovered := false
for _, existingRecord := range existingRecords {
if existingRecord.Type == record.Type &&
existingRecord.Name == record.Name &&
existingRecord.Value == record.Value {
logrus.Warnf("%v for %s already exists?", record, zone)
continue
logrus.Warnf("%s record: %s %s for %s already exists?", record.Type, record.Name, record.Value, zone)
discovered = true
}
}
if discovered {
continue
}
createdRecords, err := provider.SetRecords(
c.Context,
zone,