fix: Only recreate static files if directory does not exist yet

This commit is contained in:
2025-10-21 21:53:10 +02:00
parent 6b2fda5d9d
commit dde269d2c7
+3 -1
View File
@@ -27,6 +27,8 @@
- name: Prepare static files - name: Prepare static files
ansible.builtin.command: ansible.builtin.command:
cmd: "{{ python_executable }} -m pretix rebuild" cmd: "{{ python_executable }} -m pretix rebuild"
creates: /home/{{ ssh_user }}/.local/lib/{{ python_executable }}/site-packages/pretix/static.dist
register: static_files
- name: Move static files to Apache - name: Move static files to Apache
ansible.builtin.copy: ansible.builtin.copy:
remote_src: true remote_src: true
@@ -35,7 +37,7 @@
owner: "{{ ssh_user }}" owner: "{{ ssh_user }}"
group: "{{ ssh_user}}" group: "{{ ssh_user}}"
mode: "755" mode: "755"
register: static_files when: static_files.changed
- name: Restore SELinux context - name: Restore SELinux context
ansible.builtin.command: ansible.builtin.command:
cmd: restorecon -R -v /var/www/virtual/{{ ssh_user }}/html cmd: restorecon -R -v /var/www/virtual/{{ ssh_user }}/html