self-hosting/roles/tunuifranken/tasks/main.yml
2022-12-26 07:57:57 +01:00

38 lines
940 B
YAML

---
- name: Create tunuifranken directory
become: true
ansible.builtin.file:
path: "{{ document_root }}"
owner: "{{ apache2_owner }}"
group: "{{ apache2_group }}"
state: directory
mode: 0775
- name: Copy vHost conf
become: true
ansible.builtin.template:
src: tunuifranken.info.conf.j2
dest: /etc/apache2/sites-available/tunuifranken.info.conf
mode: 0644
notify: Reload apache2 service
- name: Activate vHost
become: true
ansible.builtin.command: a2ensite tunuifranken.info.conf
register: result
changed_when: "'already enabled' not in result.stdout"
notify: Reload apache2 service
- name: Install git
become: true
ansible.builtin.apt:
name: git
state: present
- name: Clone tunuifranken.info repo
ansible.builtin.git:
repo: git@tunuifranken.info:flyingscorpio/tunuifranken.info.git
dest: "{{ document_root }}"
clone: true
version: main
update: false