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

24 lines
585 B
YAML
Raw Normal View History

2021-10-31 14:50:18 +01:00
---
2022-03-12 16:35:32 +01:00
- name: Create tunuifranken directory
2022-03-12 16:55:03 +01:00
become: true
2021-10-31 14:50:18 +01:00
file:
path: "{{ dir_tunuifranken }}"
owner: "{{ owner_tunuifranken }}"
group: "{{ group_tunuifranken }}"
2021-10-31 14:50:18 +01:00
state: directory
2022-03-13 11:13:43 +01:00
mode: 0775
2022-03-28 16:02:40 +02:00
- 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