diff options
author | Felix Fontein <felix@fontein.de> | 2018-03-18 00:03:16 +0100 |
---|---|---|
committer | ansibot <ansibot@users.noreply.github.com> | 2018-03-17 19:03:16 -0400 |
commit | 190755ff659aa18a4a05951c04c41808358121c9 (patch) | |
tree | 1ae9b2f43aa38a51ad1e56ff823c259f3563e5b1 /lib | |
parent | 0a6b9514470044623fd32d9c5de294e53f98d724 (diff) | |
download | ansible-190755ff659aa18a4a05951c04c41808358121c9.tar.gz |
Fixing domain to authorization matching for ACME v2. (#37558)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ansible/modules/web_infrastructure/letsencrypt.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/ansible/modules/web_infrastructure/letsencrypt.py b/lib/ansible/modules/web_infrastructure/letsencrypt.py index 79b4f0158e..bca00b04fe 100644 --- a/lib/ansible/modules/web_infrastructure/letsencrypt.py +++ b/lib/ansible/modules/web_infrastructure/letsencrypt.py @@ -1150,10 +1150,12 @@ class ACMEClient(object): if info['status'] not in [201]: raise ModuleFailException("Error new order: CODE: {0} RESULT: {1}".format(info['status'], result)) - for identifier, auth_uri in zip(result['identifiers'], result['authorizations']): - domain = identifier['value'] + for auth_uri in result['authorizations']: auth_data = simple_get(self.module, auth_uri) auth_data['uri'] = auth_uri + domain = auth_data['identifier']['value'] + if auth_data.get('wildcard', False): + domain = '*.{0}'.format(domain) self.authorizations[domain] = auth_data self.order_uri = info['location'] |