diff --git a/roles/apache/files/gnu-tp.conf b/roles/apache/files/gnu-tp.conf new file mode 100644 index 0000000..8e98a61 --- /dev/null +++ b/roles/apache/files/gnu-tp.conf @@ -0,0 +1,3 @@ + + Header Set X-Clacks-Overhead "GNU Terry Pratchett" + diff --git a/roles/apache/handlers/main.yml b/roles/apache/handlers/main.yml new file mode 100644 index 0000000..e307af9 --- /dev/null +++ b/roles/apache/handlers/main.yml @@ -0,0 +1,6 @@ +# Handlers for role apache +--- +- name: restart apache2 + service: + name: apache2 + state: restarted diff --git a/roles/apache/tasks/main.yml b/roles/apache/tasks/main.yml index e29fd96..6bfa4da 100644 --- a/roles/apache/tasks/main.yml +++ b/roles/apache/tasks/main.yml @@ -15,3 +15,21 @@ - headers - proxy_http - proxy_wstunnel + +- name: Create configuration for GNU-TP header + ansible.builtin.copy: + src: files/gnu-tp.conf + dest: /etc/apache2/conf-available/gnu-tp.conf + mode: "0644" + owner: root + group: root + notify: restart apache2 + +- name: Add symlink to enable configuration + ansible.builtin.file: + src: ../conf-available/gnu-tp.conf + dest: /etc/apache2/conf-enabled/gnu-tp.conf + state: link + owner: root + group: root + notify: restart apache2