self-hosting/roles/tunuifranken-apache2/tasks/main.yml

23 lines
585 B
YAML

---
- name: Create tunuifranken directory
become: true
file:
path: "{{ dir_tunuifranken }}"
owner: "{{ owner_tunuifranken }}"
group: "{{ group_tunuifranken }}"
state: directory
mode: 0775
- name: Copy vHost conf
become: true
template:
src: tunuifranken.info.conf.j2
dest: /etc/apache2/sites-available/tunuifranken.info.conf
notify: Reload apache2 service
- name: Activate vHost
become: true
command: a2ensite tunuifranken.info.conf
register: result
changed_when: "'already enabled' not in result.stdout"
notify: Reload apache2 service