commit 3ea27a74266d1dc009a56cd95fc3cd91742fb84f Author: phil Date: Wed Jul 28 03:11:08 2021 +0200 Apache2-Rolle diff --git a/defaults/main.yml b/defaults/main.yml new file mode 100644 index 0000000..0381169 --- /dev/null +++ b/defaults/main.yml @@ -0,0 +1,2 @@ +--- +# defaults file for apache2 diff --git a/handlers/main.yml b/handlers/main.yml new file mode 100644 index 0000000..6866dc8 --- /dev/null +++ b/handlers/main.yml @@ -0,0 +1,5 @@ +--- +- name: reload apache2 + service: + name: apache2 + state: reloaded diff --git a/meta/main.yml b/meta/main.yml new file mode 100644 index 0000000..b5e2219 --- /dev/null +++ b/meta/main.yml @@ -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 diff --git a/tasks/configuration.yml b/tasks/configuration.yml new file mode 100644 index 0000000..ffeb6d3 --- /dev/null +++ b/tasks/configuration.yml @@ -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 diff --git a/tasks/main.yml b/tasks/main.yml new file mode 100644 index 0000000..828bc4d --- /dev/null +++ b/tasks/main.yml @@ -0,0 +1,3 @@ +--- +- import_tasks: packages.yml +- import_tasks: configuration.yml diff --git a/tasks/packages.yml b/tasks/packages.yml new file mode 100644 index 0000000..adea42d --- /dev/null +++ b/tasks/packages.yml @@ -0,0 +1,5 @@ +--- +- name: "packages: Abhängigkeiten installieren" + apt: + pkg: + - apache2