Ansible roles by Evolix
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.
 
 
 
 
 
 

42 lines
791 B

  1. ---
  2. - name: Copy SSL certificate
  3. copy:
  4. src: "ssl/{{ ssl_cert }}.pem"
  5. dest: "/etc/ssl/certs/{{ ssl_cert }}.pem"
  6. mode: "0644"
  7. register: ssl_copy_cert
  8. tags:
  9. - ssl
  10. - name: Copy SSL key
  11. copy:
  12. src: "ssl/{{ ssl_cert }}.key"
  13. dest: "/etc/ssl/private/{{ ssl_cert }}.key"
  14. mode: "0640"
  15. owner: root
  16. group: ssl-cert
  17. register: ssl_copy_key
  18. tags:
  19. - ssl
  20. - name: Copy SSL dhparam
  21. copy:
  22. src: "ssl/{{ ssl_cert }}.dhp"
  23. dest: "/etc/ssl/certs/{{ ssl_cert }}.dhp"
  24. mode: "0644"
  25. register: ssl_copy_dhp
  26. tags:
  27. - ssl
  28. - name: Check if Haproxy is installed
  29. command: dpkg -l haproxy
  30. register: haproxy_check
  31. check_mode: False
  32. changed_when: False
  33. failed_when: False
  34. tags:
  35. - ssl
  36. - include: haproxy.yml
  37. when: haproxy_check.rc == 0