ansible-roles/ssl/tasks/main.yml
Jérémy Lecour ee21973371
All checks were successful
Ansible Lint |Total|New|Outstanding|Fixed|Trend |:-:|:-:|:-:|:-:|:-: |2777|524|2253|2462|:+1: Reference build: <a href="https://jenkins.evolix.org/job/gitea/job/ansible-roles/job/unstable/223//ansiblelint">Evolix » ansible-roles » unstable #223</a>
gitea/ansible-roles/pipeline/head This commit looks good
Use FQCN
Fully Qualified Collection Name
2023-03-20 23:33:19 +01:00

44 lines
957 B
YAML

---
- name: Copy SSL certificate
ansible.builtin.copy:
src: "ssl/{{ ssl_cert }}.pem"
dest: "/etc/ssl/certs/{{ ssl_cert }}.pem"
mode: "0644"
register: ssl_copy_cert
tags:
- ssl
- name: Copy SSL key
ansible.builtin.copy:
src: "ssl/{{ ssl_cert }}.key"
dest: "/etc/ssl/private/{{ ssl_cert }}.key"
mode: "0640"
owner: root
group: ssl-cert
register: ssl_copy_key
tags:
- ssl
- name: Copy SSL dhparam
ansible.builtin.copy:
src: "ssl/{{ ssl_cert }}.dhp"
dest: "/etc/ssl/certs/{{ ssl_cert }}.dhp"
mode: "0644"
register: ssl_copy_dhp
tags:
- ssl
- name: Check if Haproxy is installed
ansible.builtin.shell:
cmd: "set -o pipefail && dpkg -l haproxy 2>/dev/null | grep -q -E '^(i|h)i'"
executable: /bin/bash
register: haproxy_check
check_mode: no
changed_when: False
failed_when: False
tags:
- ssl
- ansible.builtin.include: haproxy.yml
when: haproxy_check.rc == 0