2022-01-01 19:24:52 +01:00
|
|
|
---
|
|
|
|
- name: "Install Apache via apt"
|
|
|
|
apt:
|
|
|
|
update_cache: yes
|
|
|
|
state: present
|
|
|
|
name:
|
|
|
|
- apache2
|
|
|
|
|
|
|
|
- name: Upload site config to destination
|
|
|
|
copy:
|
|
|
|
src: apache-site.conf
|
|
|
|
dest: /etc/apache2/sites-available/site.conf
|
|
|
|
mode: 644
|
|
|
|
owner: root
|
|
|
|
|
2022-04-13 19:59:31 +02:00
|
|
|
- name: Enable ssl module
|
|
|
|
command: a2enmod ssl
|
|
|
|
|
|
|
|
- name: Enable proxy module
|
|
|
|
command: a2enmod proxy
|
|
|
|
|
|
|
|
- name: Enable proxy_http module
|
|
|
|
command: a2enmod proxy_http
|
|
|
|
|
2022-01-01 19:24:52 +01:00
|
|
|
- name: Enable site
|
|
|
|
command: a2ensite site.conf
|
|
|
|
|
|
|
|
- name: Enable and restart Apache2 daemon
|
|
|
|
service:
|
|
|
|
name: apache2
|
|
|
|
state: restarted
|
|
|
|
enabled: yes
|
2022-02-05 20:00:55 +01:00
|
|
|
|
|
|
|
- name: Allow https port via ufw
|
|
|
|
community.general.ufw:
|
|
|
|
rule: allow
|
|
|
|
port: https
|