system-config/playbooks/roles/nodepool-builder/tasks/webserver.yaml
Ian Wienand b1bfee423b nodepool-builder: Add webserver
This adds the webserver that serves the logs and generated images.

Change-Id: I230f5291e0bd928af2e00966d76c3f385b749cb6
2020-03-11 09:16:31 +11:00

34 lines
662 B
YAML

- name: Install Apache
package:
name:
- apache2
- apache2-utils
state: present
- name: Apache 2 ssl module
apache2_module:
state: present
name: ssl
- name: Rewrite module
apache2_module:
state: present
name: rewrite
- name: Create virtualhost
template:
src: vhost.conf.j2
dest: /etc/apache2/sites-available/001-nb.conf
- name: Disable default site
command: a2dissite 000-default.conf
args:
removes: /etc/apache2/sites-enabled/000-default.conf
- name: Enable mirror virtual host
command: a2ensite 001-nb
args:
creates: /etc/apache2/sites-enabled/001-nb.conf
notify:
- restart apache2