Skip to content

Commit

Permalink
Issue geerlingguy#81: Implement default SSL vHost removal on RedHat s…
Browse files Browse the repository at this point in the history
…ystems
  • Loading branch information
Blackskyliner authored Jul 12, 2022
1 parent 5a65cf6 commit a50c4f9
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tasks/configure-RedHat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,3 +51,24 @@
when:
- ansible_distribution_major_version | int >= 8
- not localhost_cert.stat.exists

- name: Remove default SSL VirtualHost
replace:
path: "{{ apache_server_root }}/conf.d/ssl.conf"
regexp: '({{pattern}})'
replace: '#\1'
loop_control:
loop_var: pattern
loop:
- "^<VirtualHost"
- "^</VirtualHost"
- "^DocumentRoot"
- "^ServerName"
- "^ErrorLog"
- "^TransferLog"
- "^LogLevel"
- "^SSLEngine"
- "^SSLCertificateFile"
- "^SSLCertificateKeyFile"
notify: restart apache
when: apache_remove_default_vhost

0 comments on commit a50c4f9

Please sign in to comment.