mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Fix Comment being None not '' and inject quotes into the TXT ChangeRecords
This commit is contained in:
parent
5e0e2a30e2
commit
e8678f633d
@ -137,7 +137,7 @@ def _from_aws_encoding(string): # XXX TODO
|
||||
|
||||
|
||||
def hosted_zone_present(name, Name=None, PrivateZone=False,
|
||||
CallerReference=None, Comment='', VPCs=None,
|
||||
CallerReference=None, Comment=None, VPCs=None,
|
||||
region=None, key=None, keyid=None, profile=None):
|
||||
'''
|
||||
Ensure a hosted zone exists with the given attributes.
|
||||
@ -642,6 +642,11 @@ def rr_present(name, HostedZoneId=None, DomainName=None, PrivateZone=False, Name
|
||||
ret['result'] = False
|
||||
return ret
|
||||
else:
|
||||
# for TXT records the entry must be encapsulated in quotes as required by the API
|
||||
# this appears to be incredibly difficult with the jinja templating engine
|
||||
# so inject the quotations here to make a viable ChangeBatch
|
||||
if Type == 'TXT':
|
||||
rr = '"%s"' % (rr)
|
||||
fixed_rrs += [rr]
|
||||
ResourceRecords = [{'Value': rr} for rr in sorted(fixed_rrs)]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user