From a76488f58c66fe8fa6f361d9f04b341afcaa2851 Mon Sep 17 00:00:00 2001 From: egmsft Date: Thu, 11 Apr 2024 21:44:39 -0500 Subject: [PATCH] introducing cleaner method to create ssl certificate in public ip scenario --- playbooks/ood.yml | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/playbooks/ood.yml b/playbooks/ood.yml index 754306fb..220db679 100644 --- a/playbooks/ood.yml +++ b/playbooks/ood.yml @@ -108,27 +108,16 @@ httpd_public_root: /var/www/ood/.well-known when: sslcert.stat.exists == False - - name: stop apache2 in Ubuntu - service: - name: apache2 - state: stopped - when: ansible_distribution == 'Ubuntu' - - - name: remove 000-default.conf in Ubuntu - file: - path: /etc/apache2/sites-enabled/000-default.conf - state: absent - when: ansible_distribution == 'Ubuntu' - - - name: adding Indexes to ood-portal.conf in Ubuntu + - name: disable 000-default.conf and enable ood-portal.conf in Ubuntu shell: | - sed -i 's/Options FollowSymLinks/Options Indexes FollowSymLinks/g' /etc/apache2/sites-enabled/ood-portal.conf + a2dissite 000-default.conf + a2ensite ood-portal.conf when: ansible_distribution == 'Ubuntu' - - name: start apache2 in Ubuntu + - name: activate new apache2 configuration in Ubuntu service: name: apache2 - state: started + state: reloaded when: ansible_distribution == 'Ubuntu' - name: Generate Let's Encrypt HTTPS certificate @@ -245,6 +234,12 @@ - SSLProtocol all -SSLv2 -SSLv3 -TLSv1 -TLSv1.1 - SSLCipherSuite ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256 + - name: activate new apache2 configuration in Ubuntu + service: + name: apache2 + state: reloaded + when: ansible_distribution == 'Ubuntu' + - name: Copy logo copy: src: logo.png