-
Notifications
You must be signed in to change notification settings - Fork 2
/
sso.yml
45 lines (38 loc) · 921 Bytes
/
sso.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
---
- hosts: sso
become: yes
tasks:
- name: Install packages
package: name="{{ item }}" state=present
with_items:
- docker
- docker-compose
- httpd
- python-docker-py
- git
- name: Allow Apache to connect to Keycloak
seboolean:
name: httpd_can_network_relay
state: yes
persistent: yes
- name: Configure Apache Proxy
template:
src: files/sso.conf.j2
dest: /etc/httpd/conf.d/sso.conf
notify:
- httpd_restart
- name: Start services
service: name="{{ item }}" state=started
with_items:
- docker
- httpd
- name: Ensures /root/sso dir exists
file: path=/root/sso state=directory
- name: Copy docker-compose.yml to /root/sso
template:
src: files/docker-compose.yml.j2
dest: /root/sso/docker-compose.yml
handlers:
- name: httpd_restart
service: name=httpd state=restarted
become: yes