use certificates role instead of letsencrypt role
This commit is contained in:
parent
f79fec1356
commit
53a4544ba1
6 changed files with 27 additions and 2 deletions
17
filter_plugins/filters.py
Executable file
17
filter_plugins/filters.py
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env python3
|
||||
class FilterModule(object):
|
||||
def filters(self):
|
||||
return {
|
||||
'nginx_vhosts_to_certificates': self.nginx_vhosts_to_certificates
|
||||
}
|
||||
|
||||
def nginx_vhosts_to_certificates(self, vhosts):
|
||||
certs = {}
|
||||
for i in vhosts.keys():
|
||||
if not vhosts[i]['letsencrypt']:
|
||||
continue
|
||||
certs['nginx_'+i] = {
|
||||
'backend': 'letsencrypt',
|
||||
'san': vhosts[i]['servername']
|
||||
}
|
||||
return certs
|
||||
Loading…
Add table
Add a link
Reference in a new issue