Skip to content

Commit

Permalink
move to separate file
Browse files Browse the repository at this point in the history
  • Loading branch information
mira-miracoli committed Nov 23, 2023
1 parent a7c843f commit 4cff544
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 31 deletions.
33 changes: 2 additions & 31 deletions tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,41 +161,12 @@
tags:
- galaxy_manage_cleanup

- name: Create welcome.html directory for basedomain
ansible.builtin.file:
state: directory
mode: '0755'
owner: "{{ __galaxy_privsep_user_name }}"
group: "{{ __galaxy_privsep_user_group }}"
path: "{{ galaxy_themes_static_path }}/static/welcome.html"
when: galaxy_manage_subdomain_static

- name: Template welcome.html for basedomain
ansible.builtin.template:
src: welcome.html.j2
dest: "{{ galaxy_themes_static_path }}/static/welcome.html/index.html"
owner: "{{ __galaxy_privsep_user_name }}"
group: "{{ __galaxy_privsep_user_group }}"
mode: '0644'
when: galaxy_manage_subdomain_static

- name: Include create subdomain static dirs and copy static files
ansible.builtin.include_tasks: setup_static_dirs.yml
# fail only if enabled but dictionary is empty
loop: "{{ galaxy_themes_subdomains if galaxy_themes_subdomains|length or \
galaxy_manage_static else [] }}"
loop_control:
loop_var: subdomain
- name: Inlcude static directory setup
ansible.builtin.include_tasks: static_dirs.yml
when: galaxy_manage_subdomain_static
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: Include copy themes files
ansible.builtin.include_tasks: themes.yml
# fail only if enabled but dictionary is empty
Expand Down
23 changes: 23 additions & 0 deletions tasks/static_dirs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
- name: Create welcome.html directory for basedomain
ansible.builtin.file:
state: directory
mode: '0755'
owner: "{{ __galaxy_privsep_user_name }}"
group: "{{ __galaxy_privsep_user_group }}"
path: "{{ galaxy_themes_static_path }}/static/welcome.html"

- name: Template welcome.html for basedomain
ansible.builtin.template:
src: welcome.html.j2
dest: "{{ galaxy_themes_static_path }}/static/welcome.html/index.html"
owner: "{{ __galaxy_privsep_user_name }}"
group: "{{ __galaxy_privsep_user_group }}"
mode: '0644'

- name: Include create subdomain static dirs and copy static files
ansible.builtin.include_tasks: static_subdomain_dirs.yml
loop: "{{ galaxy_themes_subdomains if galaxy_themes_subdomains | length or \
galaxy_manage_static else [] }}"
loop_control:
loop_var: subdomain
File renamed without changes.

0 comments on commit 4cff544

Please sign in to comment.