@@ -46,89 +46,29 @@ certbot:
4646{% endfor %}
4747
4848{% if salt[" match.compound" ](pillar[" roles" ][" salt-master" ][" pattern" ]) %}
49- # HTTP-validated domains
50- {% for domain in [
51- ' pypa.io' ,
52- ' www.pycon.org' ,
53- ' speed.pypy.org' ,
54- ' salt-public.psf.io' ,
55- ' planetpython.org' ,
56- ' bugs.python.org'
57- ] %}
49+ # Process ACME certificates
50+ {% for domain, domain_config in salt[" pillar.get" ](" tls:acme_certs" , {}).items() %}
5851{{ domain }}:
5952 acme.cert :
60536154 - webroot: /etc/lego
6255 - renew: 14
56+ {% if domain_config.get(' aliases' ) %}
57+ - aliases:
58+ {% for alias in domain_config.get(' aliases' , []) %}
59+ - {{ alias }}
60+ {% endfor %}
61+ {% endif %}
6362 {% if pillar[" dc" ] == " vagrant" %}
6463 - server: https://salt-master.vagrant.psf.io:14000/dir
6564 {% endif %}
65+ {% if domain_config.get(' validation' ) == " dns" %}
66+ - dns_plugin: {{ domain_config.get(' dns_plugin' ) }}
67+ - dns_plugin_credentials: {{ domain_config.get(' dns_plugin_credentials' ) }}
68+ {% else %}
6669 - require:
6770 - sls: tls.lego
71+ - pkg: certbot
72+ {% endif %}
6873{% endfor %}
69-
70- # DNS-validated domains
71- # dns plugins do not exist yet for route53 & gandi
72- {# star.python.org:#}
73- {# acme.cert:#}
74- {# - aliases:#}
75- {# - python.org#}
76- 77- {# # - dns_plugin: route53#}
78- {# # - dns_plugin_credentials: route53.python#}
79- {# - renew: 14#}
80- {# - server: https://localhost:14000/dir#}
81- {# - require:#}
82- {# - pkg: certbot#}
83- {#
84- - sls: tls.lego
85- {# star.pycon.org:#}
86- {# acme.cert:#}
87- {# - aliases:#}
88- {# - pycon.org#}
89- 90- {# # - dns_plugin: route53#}
91- {# # - dns_plugin_credentials: route53.pycon#}
92- {# - renew: 14#}
93- {# - server: https://localhost:14000/dir#}
94- {# - require:#}
95- {# - sls: tls.lego#}
96-
97- {# star.pyfound.org:#}
98- {# acme.cert:#}
99- {# - aliases:#}
100- {# - pyfound.org#}
101- 102- {# # - dns_plugin: gandiv5#}
103- {# # - dns_plugin_credentials: gandi#}
104- {# - renew: 14#}
105- {# - require:#}
106- {# - sls: tls.lego#}
107-
108- # Multi-domain certificates
109- {# jython.org:#}
110- {# acme.cert:#}
111- {# - aliases:#}
112- {# - www.jython.net#}
113- {# - jython.net#}
114- {# - www.jython.com#}
115- {# - jython.com#}
116- 117- {# - webroot: /etc/lego#}
118- {# - renew: 14#}
119- {# - require:#}
120- {# - sls: tls.lego#}
121- {# #}
122- {# bugs.python.org-multi:#}
123- {# acme.cert:#}
124- {# - name: bugs.python.org#}
125- {# - aliases:#}
126- {# - bugs.jython.org#}
127- {# - issues.roundup-tracker.org#}
128- {# - mail.roundup-tracker.org#}
129- 130- {# - webroot: /etc/lego#}
131- {# - renew: 14#}
132- {# - require:#}
133- {# - sls: tls.lego#}
13474{% endif %}
0 commit comments