Skip to content

Commit

Permalink
introducing cleaner method to create ssl certificate in public ip sce…
Browse files Browse the repository at this point in the history
…nario
  • Loading branch information
egmsft committed Apr 12, 2024
1 parent 73b3d45 commit a76488f
Showing 1 changed file with 11 additions and 16 deletions.
27 changes: 11 additions & 16 deletions playbooks/ood.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit a76488f

Please sign in to comment.