Alan Orth
d06ddf8a81
Seems there is some YAML sublety that causes this syntax to insert double spaces on the destination file... using native YAML hashes are a workaround, see GitHub issues: https://github.com/ansible/ansible/issues/9067 https://github.com/ansible/ansible/issues/9172 Signed-off-by: Alan Orth <alan.orth@gmail.com>
27 lines
935 B
YAML
27 lines
935 B
YAML
---
|
|
|
|
- name: Configure https vhosts
|
|
template: src=vhost.conf.j2 dest={{ nginx_confd_path }}/{{ item.nginx_domain_name }}.conf mode=0644 owner=root group=root
|
|
with_items: nginx_tls_vhosts
|
|
notify:
|
|
- reload nginx
|
|
|
|
# concatenated key + cert, can live in the same file
|
|
# See: http://nginx.org/en/docs/http/configuring_https_servers.html
|
|
- name: Copy TLS certs
|
|
copy: { dest: "{{ tls_key_dir }}/{{ item.nginx_domain_name }}.crt.pem", content: "{{ item.tls_cert }}", mode: 0700, owner: 'root', group: 'root' }
|
|
with_items: nginx_tls_vhosts
|
|
notify:
|
|
- reload nginx
|
|
|
|
- name: Generate 2048-bit dhparam
|
|
command: openssl dhparam -out dhparam.pem 2048 chdir=/etc/ssl/certs creates=dhparam.pem
|
|
notify:
|
|
- reload nginx
|
|
|
|
- name: Create vhost document roots
|
|
file: path={{ nginx_root_prefix }}/{{ item.nginx_domain_name }} state=directory mode=0755 owner=nginx group=nginx
|
|
with_items: nginx_tls_vhosts
|
|
|
|
# vim: set ts=2 sw=2:
|