Skip to content

Commit

Permalink
wip! manage apache and shibboleth
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tsibley committed Jul 27, 2021
1 parent 0ad27a0 commit 76cfabe
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
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.

0 comments on commit 76cfabe

Please sign in to comment.