You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ansible-roles/ssl/tasks/haproxy.yml

34 lines
665 B

---
- name: Concatenate SSL certificate, key and dhparam
set_fact:
ssl_cat: "{{ ssl_cat | default() }}{{ lookup('file', item) }}\n"
with_fileglob:
- "ssl/{{ ssl_cert }}.pem"
- "ssl/{{ ssl_cert }}.key"
- "ssl/{{ ssl_cert }}.dhp"
tags:
- ssl
- name: Create haproxy ssl directory
file:
dest: /etc/haproxy/ssl
state: directory
mode: "0700"
tags:
- ssl
- name: Copy concatenated certificate and key
copy:
content: "{{ ssl_cat }}"
dest: "/etc/haproxy/ssl/{{ ssl_cert }}.pem"
mode: "0600"
notify: reload haproxy
tags:
- ssl
- name: Reset ssl_cat variable
set_fact:
ssl_cat: ""
tags:
- ssl