summaryrefslogtreecommitdiff
path: root/roles/nginx/auth/whawty-sso/base/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'roles/nginx/auth/whawty-sso/base/tasks')
-rw-r--r--roles/nginx/auth/whawty-sso/base/tasks/main.yml20
1 files changed, 20 insertions, 0 deletions
diff --git a/roles/nginx/auth/whawty-sso/base/tasks/main.yml b/roles/nginx/auth/whawty-sso/base/tasks/main.yml
new file mode 100644
index 00000000..a410cfeb
--- /dev/null
+++ b/roles/nginx/auth/whawty-sso/base/tasks/main.yml
@@ -0,0 +1,20 @@
+---
+# TODO: create whawty-nginx-sso user?
+
+- name: install nginx-sso package
+ apt:
+ name: whawty-nginx-sso
+ state: present
+
+- name: generate nginx snippets
+ loop: "{{ whawty_nginx_sso_backends | dict2items }}"
+ loop_control:
+ label: "{{ item.key }}"
+ template:
+ src: nginx.snippet.j2
+ dest: "/etc/nginx/snippets/whawty-sso-{{ item.key }}.conf"
+
+- name: install systemd service unit
+ template:
+ src: whawty-nginx-sso@.service.j2
+ dest: /etc/systemd/system/whawty-nginx-sso@.service