xoxys.nginx/tasks/tls.yml

29 lines
1.0 KiB
YAML
Raw Normal View History

2018-08-11 12:59:43 +00:00
- block:
2018-08-12 09:31:12 +00:00
- name: Copy certs and private key (content)
2018-08-11 12:59:43 +00:00
copy:
2018-08-12 09:31:12 +00:00
content: "{{ item.src }}"
dest: "{{ item.dest }}"
mode: "{{ item.mode }}"
with_items:
2018-08-14 21:04:27 +00:00
- { 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' }
2018-08-12 09:31:12 +00:00
loop_control:
label: "{{ item.dest }}"
notify: __nginx_reload
when: nginx_tls_source_use_content
2018-08-11 12:59:43 +00:00
2018-08-12 09:31:12 +00:00
- name: Copy certs and private key (files)
2018-08-11 12:59:43 +00:00
copy:
2018-08-12 09:31:12 +00:00
src: "{{ item.src }}"
dest: "{{ item.dest }}"
mode: "{{ item.mode }}"
with_items:
2018-08-14 21:58:51 +00:00
- { 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/private/{{ nginx_tls_cert_file }}', mode: '0750' }
2018-08-12 09:31:12 +00:00
loop_control:
label: "{{ item.dest }}"
notify: __nginx_reload
when: nginx_tls_source_use_files
2018-08-11 12:59:43 +00:00
become: True
become_user: root