diff --git a/tasks/main.yml b/tasks/main.yml index bc95b99..483dab5 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -161,11 +161,11 @@ tags: - galaxy_manage_cleanup -- name: Zip static directory - community.general.archive: - path: "{{ galaxy_themes_static_path }}/static/" - dest: "{{ galaxy_themes_static_path }}/static.gz" - when: galaxy_manage_subdomain_static +#- name: Zip static directory +# community.general.archive: +# path: "{{ galaxy_themes_static_path }}/static/" +# dest: "{{ galaxy_themes_static_path }}/static.gz" +# when: galaxy_manage_subdomain_static - name: Include create subdomain static dirs and copy static files ansible.builtin.include_tasks: setup_static_dirs.yml @@ -178,11 +178,11 @@ tags: - galaxy_manage_subdomain_static -- name: Remove static archive - ansible.builtin.file: - path: "{{ galaxy_themes_static_path }}/static.gz" - state: absent - when: galaxy_manage_subdomain_static +#- name: Remove static archive +# ansible.builtin.file: +# path: "{{ galaxy_themes_static_path }}/static.gz" +# state: absent +# when: galaxy_manage_subdomain_static - name: Include copy themes files ansible.builtin.include_tasks: themes.yml diff --git a/tasks/setup_static_dirs.yml b/tasks/setup_static_dirs.yml index a791da9..7ff99f9 100644 --- a/tasks/setup_static_dirs.yml +++ b/tasks/setup_static_dirs.yml @@ -7,11 +7,12 @@ group: "{{ __galaxy_privsep_user_group }}" path: "{{ galaxy_themes_static_path }}/static-{{ subdomain.name }}" -- name: Add generic static files to subdomain static dir - ansible.builtin.unarchive: - src: "{{ galaxy_themes_static_path }}/static.gz" +- name: Synchronize contents from static to static-"{{ subdomain.name }}" + ansible.posix.synchronize: + src: "{{ galaxy_themes_static_path }}/static/" dest: "{{ galaxy_themes_static_path }}/static-{{ subdomain.name }}" - remote_src: yes + rsync_opts: ["--ignore-existing"] + delegate_to: "{{ inventory_hostname }}" - name: Check if welcome.html is present in files ansible.builtin.stat: @@ -43,7 +44,7 @@ mode: '0644' when: not custom_welcome.stat.exists -- name: Copy static files +- name: Include copy_static_files.yml ansible.builtin.include_tasks: copy_static_files.yml loop: "{{ galaxy_themes_static_keys | dict2items }}" loop_control: