2021-10-31 15:33:14 +01:00
|
|
|
---
|
2022-03-12 16:35:32 +01:00
|
|
|
- name: Create 2px directory
|
2022-03-12 16:55:03 +01:00
|
|
|
become: true
|
2021-10-31 15:33:14 +01:00
|
|
|
file:
|
2022-03-12 16:53:40 +01:00
|
|
|
path: "{{ dir_2px }}"
|
|
|
|
owner: "{{ owner_2px }}"
|
|
|
|
group: "{{ group_2px }}"
|
2021-10-31 15:33:14 +01:00
|
|
|
state: directory
|
2022-03-13 11:13:43 +01:00
|
|
|
mode: 0775
|
2022-03-12 19:31:54 +01:00
|
|
|
|
2022-03-13 10:04:35 +01:00
|
|
|
- name: Install mod_wsgi
|
|
|
|
become: true
|
|
|
|
apt:
|
|
|
|
name: libapache2-mod-wsgi-py3
|
|
|
|
state: present
|
2022-06-25 14:48:38 +02:00
|
|
|
update_cache: true
|
2022-03-13 10:04:35 +01:00
|
|
|
notify: Reload apache2 service
|
|
|
|
|
2022-03-15 15:31:12 +01:00
|
|
|
- name: Enable wsgi module
|
2022-03-12 20:06:23 +01:00
|
|
|
become: true
|
|
|
|
apache2_module:
|
2022-03-15 15:31:12 +01:00
|
|
|
name: wsgi
|
2022-03-12 20:06:23 +01:00
|
|
|
state: present
|
|
|
|
notify: Reload apache2 service
|
|
|
|
|
2022-03-12 19:31:54 +01:00
|
|
|
- name: Copy vHost conf
|
|
|
|
become: true
|
|
|
|
template:
|
|
|
|
src: 2px.info.conf.j2
|
|
|
|
dest: /etc/apache2/sites-available/2px.info.conf
|
2022-06-25 14:48:38 +02:00
|
|
|
mode: 0644
|
2022-03-12 19:31:54 +01:00
|
|
|
notify: Reload apache2 service
|
|
|
|
|
|
|
|
- name: Activate vHost
|
|
|
|
become: true
|
|
|
|
command: a2ensite 2px.info.conf
|
2022-03-13 10:21:21 +01:00
|
|
|
register: result
|
|
|
|
changed_when: "'already enabled' not in result.stdout"
|
2022-03-12 19:31:54 +01:00
|
|
|
notify: Reload apache2 service
|