Explorar el Código

added option to download created ssl certs

Fabian Peter Hammerle hace 8 años
padre
commit
1bc3894dd9
Se han modificado 1 ficheros con 10 adiciones y 0 borrados
  1. 10 0
      tasks/vhosts.yml

+ 10 - 0
tasks/vhosts.yml

@@ -23,6 +23,16 @@
   with_items: '{{nginx_vhosts|default([])}}'
   register: vhosts_x509
 
+- name: Download ssl certificates.
+  fetch:
+    src: '{{item.cert_path}}'
+    flat: yes
+    dest: '{{nginx_ssl_cert_download_path_prefix}}/{{item.subject_common_name}}'
+    fail_on_missing: yes
+    validate_checksum: yes
+  when: item.subject_common_name is defined and nginx_ssl_cert_download_path_prefix is defined
+  with_items: '{{vhosts_x509.results}}'
+
 - name: Add managed vhost config file (if any vhosts are configured).
   template:
     src: vhosts.j2