fix nginx tls handling
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Robert Kaussow 2019-06-11 10:06:02 +02:00
parent 96fb7fb036
commit 9b49e0c892
2 changed files with 2 additions and 16 deletions

View File

@ -69,8 +69,6 @@ droneci_gitea_skip_verify: False
droneci_tls_cert_path: droneci.pem droneci_tls_cert_path: droneci.pem
droneci_tls_key_path: droneci.pem droneci_tls_key_path: droneci.pem
droneci_tls_source_use_content: False
droneci_tls_source_use_files: True
droneci_tls_cert_source: mycert.pem droneci_tls_cert_source: mycert.pem
droneci_tls_key_source: mykey.pem droneci_tls_key_source: mykey.pem

View File

@ -1,18 +1,6 @@
--- ---
- block: - block:
- name: Copy certs and private key to nginx proxy (content) - name: Copy certs and private key to nginx proxy
copy:
content: "{{ item.src }}"
dest: "{{ item.dest }}"
mode: "{{ item.mode }}"
with_items:
- { src: "{{ droneci_tls_key_source }}", dest: '/etc/pki/tls/private/{{ droneci_tls_key_path | basename }}', mode: '0600' }
- { src: "{{ droneci_tls_cert_source }}", dest: '/etc/pki/tls/certs/{{ droneci_tls_cert_path | basename }}', mode: '0750' }
loop_control:
label: "{{ item.dest }}"
when: droneci_tls_source_use_content
- name: Copy certs and private key to nginx proxy (files)
copy: copy:
src: "{{ item.src }}" src: "{{ item.src }}"
dest: "{{ item.dest }}" dest: "{{ item.dest }}"
@ -22,10 +10,10 @@
- { src: "{{ droneci_tls_cert_source }}", dest: '/etc/pki/tls/certs/{{ droneci_tls_cert_path | basename }}', mode: '0750' } - { src: "{{ droneci_tls_cert_source }}", dest: '/etc/pki/tls/certs/{{ droneci_tls_cert_path | basename }}', mode: '0750' }
loop_control: loop_control:
label: "{{ item.dest }}" label: "{{ item.dest }}"
when: droneci_tls_source_use_files
delegate_to: "{{ droneci_nginx_server }}" delegate_to: "{{ droneci_nginx_server }}"
become: True become: True
become_user: root become_user: root
when: droneci_nginx_tls_enabled | bool
tags: tls_renewal tags: tls_renewal
- block: - block: