--- - name: Ensure the directory exist file: path: /var/local/keycloak state: directory - name: Warning debug: msg: This is a test server, do not use in production - name: Copy env variables template: src: dot_env.j2 dest: /var/local/keycloak/.env mode: 0400 owner: root group: staff - name: Ensure the certificate directory exist file: path: /var/local/keycloak/certificates state: directory - name: Copy key copy: src: /var/certificates/{{ server_hostname }}_privkey.pem dest: /var/local/keycloak/certificates/tls.key remote_src: yes - name: Copy certificate copy: src: /var/certificates/{{ server_hostname }}_cert.pem dest: /var/local/keycloak/certificates/tls.crt remote_src: yes - name: Copy docker-compose.yml template: src: docker-compose.yml.j2 dest: /var/local/keycloak/docker-compose.yml mode: 0644 owner: root group: staff - name: Start the container docker_compose: project_src: /var/local/keycloak