Apache2-Rolle

This commit is contained in:
phil 2021-07-28 03:11:08 +02:00
commit 3ea27a7426
6 changed files with 35 additions and 0 deletions

2
defaults/main.yml Normal file
View file

@ -0,0 +1,2 @@
---
# defaults file for apache2

5
handlers/main.yml Normal file
View file

@ -0,0 +1,5 @@
---
- name: reload apache2
service:
name: apache2
state: reloaded

10
meta/main.yml Normal file
View file

@ -0,0 +1,10 @@
galaxy_info:
author: systemausfall.org
description: Role to setup Apache2
company: Sense.Lab
license: GPLv3
min_ansible_version: 2.9
plaforms:
- name: Debian
versions:
- Buster

10
tasks/configuration.yml Normal file
View file

@ -0,0 +1,10 @@
- name: "configuration: Server-Tokens deaktivieren"
lineinfile:
path: /etc/apache2/conf-enabled/security.conf
regexp: '^ServerTokens OS'
line: ServerTokens Prod
notify: reload apache2
- name: "configuration: Deaktiviere access-Logs"
command: a2disconf other-vhosts-access-log
notify: reload apache2

3
tasks/main.yml Normal file
View file

@ -0,0 +1,3 @@
---
- import_tasks: packages.yml
- import_tasks: configuration.yml

5
tasks/packages.yml Normal file
View file

@ -0,0 +1,5 @@
---
- name: "packages: Abhängigkeiten installieren"
apt:
pkg:
- apache2