--- - name: Create Authentik directories ansible.builtin.file: path: "{{ item }}" state: directory mode: '0755' loop: - "{{ authentik_data_dir }}" - "{{ authentik_data_dir }}/media" - "{{ authentik_data_dir }}/custom-templates" - "{{ authentik_data_dir }}/certs" - "{{ authentik_data_dir }}/postgres" - name: Deploy Authentik docker-compose ansible.builtin.template: src: docker-compose.yml.j2 dest: "{{ authentik_data_dir }}/docker-compose.yml" mode: '0644' notify: restart authentik - name: Start Authentik community.docker.docker_compose_v2: project_src: "{{ authentik_data_dir }}" state: present - name: Wait for Authentik to be ready ansible.builtin.uri: url: "http://localhost:9001/-/health/ready/" method: GET status_code: 200 register: result until: result.status == 200 retries: 30 delay: 10