--- - name: Enable Apache2 modules community.general.apache2_module: name: "{{ item }}" state: present with_items: - alias - proxy - rewrite - headers - env - dir - mime notify: - Restart Apache - name: Enable Apache2 module SSL community.general.apache2_module: name: ssl state: present when: nextcloud_ssl