Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions backoffice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

tasks:
- import_tasks: tasks/apt-update.yaml
- import_tasks: tasks/apache.yaml
- import_tasks: tasks/systemd.yaml
- import_tasks: tasks/prometheus.yaml
- import_tasks: tasks/uwsgi.yaml
Expand All @@ -23,6 +24,16 @@
systemd:
daemon_reload: yes

- name: apache is restarted
service:
name: apache2
state: restarted

- name: apache is reloaded
service:
name: apache2
state: reloaded

- name: prometheus is restarted
service:
name: prometheus
Expand Down
28 changes: 28 additions & 0 deletions tasks/apache.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
- name: switchaai apt-source package is installed
apt:
deb: https://pkg.switch.ch/switchaai/ubuntu/dists/bionic/main/binary-all/misc/switchaai-apt-source_1.0.0ubuntu1_all.deb
register: switchaai_source_pkg

- name: apt cache is up-to-date after new source installed
apt:
update_cache: true
when: switchaai_source_pkg.changed

- name: apache is installed
apt:
package:
- apache2
- libapache2-mod-proxy-uwsgi
- libapache2-mod-shib
- libapache2-mod-wsgi-py3
- python3-certbot-apache

- name: apache is enabled
service:
name: apache2
enabled: yes
state: started

# XXX TODO: merge backoffice-apache2.git and backoffice-shibboleth.git into
# this repo and manage their installation, etc.