diff --git a/site-cookbooks/kosmos-ejabberd/templates/vhost.yml.erb b/site-cookbooks/kosmos-ejabberd/templates/vhost.yml.erb index eb6c943..77fe955 100644 --- a/site-cookbooks/kosmos-ejabberd/templates/vhost.yml.erb +++ b/site-cookbooks/kosmos-ejabberd/templates/vhost.yml.erb @@ -1,4 +1,6 @@ # Generated by Chef for <%= @host[:name] %> +# FIXME: The files only exist after the certbot hook created them, meaning +# we need to run Chef a second time <% if File.exist?("/opt/ejabberd/conf/#{@host[:name]}.crt") && File.exist?("/opt/ejabberd/conf/#{@host[:name]}.key") -%> certfiles: - "/opt/ejabberd/conf/<%= @host[:name] %>.crt"