2022-12-27 12:01:38 +01:00
|
|
|
---
|
|
|
|
- name: "configuration | Deaktiviere Server-Tokens"
|
|
|
|
ansible.builtin.lineinfile:
|
2021-07-28 03:11:08 +02:00
|
|
|
path: /etc/apache2/conf-enabled/security.conf
|
|
|
|
regexp: '^ServerTokens OS'
|
|
|
|
line: ServerTokens Prod
|
|
|
|
notify: reload apache2
|
|
|
|
|
2022-12-27 12:01:38 +01:00
|
|
|
- name: "configuration | Deaktiviere access-Logs"
|
|
|
|
ansible.builtin.command:
|
|
|
|
cmd: a2disconf other-vhosts-access-log
|
|
|
|
removes: /etc/apache2/conf-enabled/other-vhosts-access-log.conf
|
2021-07-28 03:11:08 +02:00
|
|
|
notify: reload apache2
|
2021-07-28 09:56:47 +02:00
|
|
|
|
2022-12-27 12:01:38 +01:00
|
|
|
- name: "apache | Generiere Diffie-Hellman-Parameter"
|
|
|
|
openssl_dhparam:
|
|
|
|
path: "{{ dhparams_path }}"
|
2023-01-02 19:38:11 +01:00
|
|
|
when: "'extern_hosts' in group_names"
|
2022-12-27 12:01:38 +01:00
|
|
|
|
|
|
|
- name: "configuration | Kopiere Dateien"
|
|
|
|
ansible.builtin.copy:
|
2021-07-28 09:56:47 +02:00
|
|
|
src: "{{ item }}"
|
|
|
|
dest: "/etc/apache2/conf-available/{{ item }}"
|
2022-12-27 12:01:38 +01:00
|
|
|
mode: 0644
|
|
|
|
loop:
|
|
|
|
- add-headers.conf
|
|
|
|
- letsencrypt.conf
|
|
|
|
- sao-cache.conf
|
|
|
|
|
|
|
|
- name: "configuration | Kopiere SSL-Konfiguration"
|
|
|
|
ansible.builtin.template:
|
|
|
|
src: ssl.conf
|
|
|
|
dest: /etc/apache2/conf-available/ssl.conf
|
|
|
|
mode: 0644
|
|
|
|
|
2022-12-28 16:07:32 +01:00
|
|
|
- name: "configuration | Aktiviere Module"
|
|
|
|
ansible.builtin.apache2_module:
|
|
|
|
name: "{{ item }}"
|
|
|
|
state: present
|
|
|
|
notify: reload apache2
|
|
|
|
when: "'extern_hosts' in group_names"
|
|
|
|
loop:
|
|
|
|
- headers
|
|
|
|
- mpm_event
|
|
|
|
- ssl
|
|
|
|
|
2022-12-27 12:01:38 +01:00
|
|
|
- name: "configuration | Aktiviere Konfiguration"
|
|
|
|
ansible.builtin.command:
|
2022-12-28 16:07:32 +01:00
|
|
|
cmd: "a2enconf {{ item }}"
|
2022-12-27 12:01:38 +01:00
|
|
|
creates: "/etc/apache2/conf-enabled/{{ item }}"
|
|
|
|
notify: reload apache2
|
|
|
|
when: "'extern_hosts' in group_names"
|
2021-07-28 09:56:47 +02:00
|
|
|
loop:
|
|
|
|
- add-headers.conf
|
2021-07-28 11:24:28 +02:00
|
|
|
- letsencrypt.conf
|
2022-07-26 17:45:32 +02:00
|
|
|
- sao-cache.conf
|
2021-07-28 09:56:47 +02:00
|
|
|
- ssl.conf
|