first commit

This commit is contained in:
Ludovic Cartier
2025-09-23 16:06:56 +02:00
commit de96d3c2bb
10 changed files with 206 additions and 0 deletions

57
tasks/configure.yml Normal file
View File

@@ -0,0 +1,57 @@
---
- name: 'apache2 | update ports'
replace:
path: /etc/apache2/ports.conf
regexp: '^Listen 80'
replace: "Listen {{ apache2_listen_ip }}:{{ apache2_listen_port }}"
backup: yes
notify:
- apache2 restart
tags:
- apache2
- apache2_configure
- name: 'apache2 | configuration | defaults modules'
community.general.apache2_module:
name: "{{ item.module }}"
state: "{{ item.state }}"
ignore_configcheck: true
loop:
- module: headers
state: present
- module: rewrite
state: present
- module: proxy
state: present
- module: proxy_fcgi
state: present
- module: proxy_http
state: present
notify:
- apache2 restart
tags:
- apache2
- apache2_configure
- name: 'apache2 | configuration | create ACME directory'
file:
path: /var/www/letsencrypt/.well-known/acme-challenge/
state: directory
owner: www-data
group: www-data
mode: '0755'
tags:
- apache2
- apache2_configure
- name: 'apache2 | configuration | push ACME configuration'
copy:
src: 'acme.conf'
dest: /etc/apache2/conf-enabled
owner: root
mode: 644
notify:
- apache2 restart
tags:
- apache2
- apache2_configure