29 lines
1017 B
YAML
29 lines
1017 B
YAML
- block:
|
|
- name: Copy certs and private key (content)
|
|
copy:
|
|
content: "{{ item.src }}"
|
|
dest: "{{ item.dest }}"
|
|
mode: "{{ item.mode }}"
|
|
with_items:
|
|
- { src: "{{ nginx_tls_key_source }}", dest: '/etc/pki/tls/private/{{ nginx_tls_key_file }}', mode: '0600' }
|
|
- { src: "{{ nginx_tls_cert_source }}", dest: '/etc/pki/tls/certs/{{ nginx_tls_cert_file }}', mode: '0750' }
|
|
loop_control:
|
|
label: "{{ item.dest }}"
|
|
notify: __nginx_reload
|
|
when: nginx_tls_source_use_content
|
|
|
|
- name: Copy certs and private key (files)
|
|
copy:
|
|
src: "{{ item.src }}"
|
|
dest: "{{ item.dest }}"
|
|
mode: "{{ item.mode }}"
|
|
with_items:
|
|
- { src: "{{ nginx_tls_key_source }}", dest: '{{ nginx_tls_key_file }}', mode: '0600' }
|
|
- { src: "{{ nginx_tls_cert_source }}", dest: '{{ nginx_tls_cert_file }}', mode: '0750' }
|
|
loop_control:
|
|
label: "{{ item.dest }}"
|
|
notify: __nginx_reload
|
|
when: nginx_tls_source_use_files
|
|
become: True
|
|
become_user: root
|