Skip to content

Commit 76cfabe

Browse files
committed
wip! manage apache and shibboleth
Ensure both are installed and configured. XXX TODO: move config files in backoffice-apache2.git and backoffice-shibboleth.git into this repo with history preserved by creating a branches in them that move files into appropriate locations, adding those repos as new remotes to this one, and merging said branches into master here.
1 parent 0ad27a0 commit 76cfabe

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed

backoffice.yaml

+11
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
tasks:
1414
- import_tasks: tasks/apt-update.yaml
15+
- import_tasks: tasks/apache.yaml
1516
- import_tasks: tasks/systemd.yaml
1617
- import_tasks: tasks/prometheus.yaml
1718
- import_tasks: tasks/uwsgi.yaml
@@ -23,6 +24,16 @@
2324
systemd:
2425
daemon_reload: yes
2526

27+
- name: apache is restarted
28+
service:
29+
name: apache2
30+
state: restarted
31+
32+
- name: apache is reloaded
33+
service:
34+
name: apache2
35+
state: reloaded
36+
2637
- name: prometheus is restarted
2738
service:
2839
name: prometheus

tasks/apache.yaml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
- name: switchaai apt-source package is installed
3+
apt:
4+
deb: https://pkg.switch.ch/switchaai/ubuntu/dists/bionic/main/binary-all/misc/switchaai-apt-source_1.0.0ubuntu1_all.deb
5+
register: switchaai_source_pkg
6+
7+
- name: apt cache is up-to-date after new source installed
8+
apt:
9+
update_cache: true
10+
when: switchaai_source_pkg.changed
11+
12+
- name: apache is installed
13+
apt:
14+
package:
15+
- apache2
16+
- libapache2-mod-proxy-uwsgi
17+
- libapache2-mod-shib
18+
- libapache2-mod-wsgi-py3
19+
- python3-certbot-apache
20+
21+
- name: apache is enabled
22+
service:
23+
name: apache2
24+
enabled: yes
25+
state: started
26+
27+
# XXX TODO: merge backoffice-apache2.git and backoffice-shibboleth.git into
28+
# this repo and manage their installation, etc.

0 commit comments

Comments
 (0)