23 lines
576 B
YAML
23 lines
576 B
YAML
---
|
|
- name: Create index.html
|
|
ansible.builtin.template:
|
|
src: httpd/index.html.j2
|
|
dest: "{{ httpd_site_root }}/index.html"
|
|
owner: www-data
|
|
group: www-data
|
|
mode: '0644'
|
|
|
|
- name: Create Apache virtual host config
|
|
ansible.builtin.template:
|
|
src: httpd/vhost.conf.j2
|
|
dest: "/etc/apache2/sites-available/{{ httpd_site_name }}.conf"
|
|
notify: Reload Apache
|
|
|
|
- name: Enable site
|
|
ansible.builtin.command: "a2ensite {{ httpd_site_name }}"
|
|
notify: Reload Apache
|
|
|
|
- name: Enable SSL module
|
|
ansible.builtin.command: a2enmod ssl
|
|
notify: Reload Apache
|