finish and test nextcloud role

This commit is contained in:
2025-02-06 15:00:16 +01:00
parent a729ea3ecf
commit c472672b41
16 changed files with 78 additions and 33 deletions

View File

@@ -0,0 +1,35 @@
- name: Set hostname
ansible.builtin.hostname:
name: "{{ hostname }}"
- name: "Enable recommended Apache Modules."
apache2_module: "name={{ item }} state=present"
with_items:
- dir
- env
- headers
- mime
- rewrite
- setenvif
notify: restart apache
- name: Add Apache virtualhost for Owncloud
template:
src: "templates/{{ site_conf }}.j2"
dest: "/etc/apache2/sites-available/{{ site_conf }}"
owner: root
group: root
mode: 0644
notify: restart apache
- name: Enable the Nextcloud site.
command: >
a2ensite {{ site_conf }}
creates="/etc/apache2/sites-enabled/{{ site_conf }}"
notify: restart apache
- name: Disable the default site.
command: >
a2dissite 000-default
removes=/etc/apache2/sites-enabled/000-default.conf
notify: restart apache