fqcn[action-core]: Use FQCN for builtin module actions (service). roles/apache/handlers/main.yml:3 Use `ansible.builtin.service` or `ansible.legacy.service` instead. fqcn[action-core]: Use FQCN for builtin module actions (apt). roles/apache/tasks/main.yml:2 Use `ansible.builtin.apt` or `ansible.legacy.apt` instead. fqcn[action]: Use FQCN for module actions, such `community.general.apache2_module`. roles/apache/tasks/main.yml:8 Action `apache2_module` is not FQCN.
35 lines
804 B
YAML
35 lines
804 B
YAML
---
|
|
- name: Ensure Apache2 and modules are installed and up to date
|
|
ansible.builtin.apt:
|
|
name:
|
|
- apache2
|
|
state: present
|
|
|
|
- name: Ensure necessary modules are enabled
|
|
community.general.apache2_module:
|
|
name: "{{ item }}"
|
|
state: present
|
|
with_items:
|
|
- rewrite
|
|
- ssl
|
|
- 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
|