diff --git a/states/_modules/pki.py b/states/_modules/pki.py index 9d439b7..1c3fbf9 100644 --- a/states/_modules/pki.py +++ b/states/_modules/pki.py @@ -41,4 +41,4 @@ def get_pki_cert(url="http://pki", res = urlopen(req, jsondata.encode('utf-8')) resj = json.loads(res.read()) - return resj["certificate"], resj["privatekey"] + return resj[domains[0]]["certificate"], resj[domains[0]]["privatekey"]