--- - hosts: all tasks: - name: Sanity check assert: that: - ansible_os_family == "Debian" - ansible_distribution_major_version == "12" - name: Install packages package: name: - apache2 - php-fpm - dokuwiki notify: Restart Apache2 - name: Fix Dokuwiki config for Apache lineinfile: dest: /etc/apache2/conf-available/dokuwiki.conf regex: " Allow from localhost" line: " Allow from all" backup: yes notify: Restart Apache2 - name: Enable Apache configurations file: state: link src: "../conf-available/{{ item }}" dest: "/etc/apache2/conf-enabled/{{ item }}" loop: - dokuwiki.conf - php8.2-fpm.conf notify: Restart Apache2 - name: Enable Apache2 modules apache2_module: name: "{{ item }}" state: present loop: - proxy - proxy_fcgi notify: Restart Apache2 handlers: - name: Stop Apache2 service: name: apache2 state: stopped listen: Restart Apache2 - name: Start Apache2 service: name: apache2 state: started listen: Restart Apache2