- name: Create Authentik appdata directory ansible.builtin.file: path: "/opt/{{ item.name }}" state: directory owner: "{{ users.0.username }}" group: "{{ users.0.groupname }}" mode: "{{ item.mode | default('0755')}}" loop: - name: appdata - name: appdata/authentik - name: appdata/authentik/postgresql mode: "0700" - name: appdata/authentik/backups - name: appdata/authentik/certs - name: appdata/authentik/media - name: appdata/authentik/templates - name: Seed compose ansible.builtin.template: src: "docker-compose.yml.j2" dest: "/opt/appdata/authentik/docker-compose.yml" owner: "{{ users.0.username }}" group: "{{ users.0.groupname }}" mode: 0644