1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- ---
- - name: pgsql libs needed
- apt:
- pkg: libpq-dev
- state: installed
- - name: install psycopg2
- pip:
- name: psycopg2
- - name: Setup Kong Postgres DB
- postgresql_db:
- name: "{{keycloak_pg_db}}"
- login_host: "{{keycloak_pg_host}}"
- login_user: "{{postgres_user}}"
- login_password: "{{postgres_password}}"
- - name: Create driver directory
- file:
- path: "{{ dd_keycloack_module_path }}"
- mode: 0750
- recurse: yes
- state: directory
- - name: Download driver
- get_url:
- url: "https://jdbc.postgresql.org/download/postgresql-{{dd_keycloack_driver_version}}.jar"
- dest: "{{ dd_keycloack_module_path }}"
- mode: 0750
- - name: Templatize the module config
- template:
- src: module.xml.j2
- dest: "{{ dd_keycloack_module_path }}/module.xml"
- mode: 0750
- - name: Templatize the standalone config
- template:
- src: "standalone.xml.j2"
- dest: /opt/keycloak/standalone/configuration
- - name: Start keycloak process
- tags:
- - keycloak
- runit:
- name: keycloak
- enabled: yes
- state: start
- timeout: 90
- command: /opt/keycloak/bin/standalone.sh -b 0.0.0.0 --server-config=standalone.xml
|