fix: Copy flow scripts into container before executing them
The flows.yml task was trying to execute Python scripts inside the container before copying them in with docker cp. This caused the 'No such file or directory' error on fresh deployments. Fixed by reordering tasks to: 1. Copy scripts to host /tmp 2. Docker cp into container 3. Execute scripts inside container 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
8c3553d89f
commit
5b38c4b5b4
1 changed files with 6 additions and 6 deletions
|
|
@ -17,6 +17,12 @@
|
|||
dest: /tmp/create_invitation_flow.py
|
||||
mode: '0755'
|
||||
|
||||
- name: Copy flow scripts into container
|
||||
shell: |
|
||||
docker cp /tmp/create_recovery_flow.py authentik-server:/tmp/
|
||||
docker cp /tmp/create_invitation_flow.py authentik-server:/tmp/
|
||||
changed_when: false
|
||||
|
||||
- name: Create/verify recovery flow
|
||||
shell: |
|
||||
docker exec -i authentik-server python3 /tmp/create_recovery_flow.py \
|
||||
|
|
@ -35,12 +41,6 @@
|
|||
changed_when: "'already exists' not in invitation_flow.stdout"
|
||||
failed_when: invitation_flow.rc != 0
|
||||
|
||||
- name: Copy flow scripts into container
|
||||
shell: |
|
||||
docker cp /tmp/create_recovery_flow.py authentik-server:/tmp/
|
||||
docker cp /tmp/create_invitation_flow.py authentik-server:/tmp/
|
||||
changed_when: false
|
||||
|
||||
- name: Cleanup flow scripts from host
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue