Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom welcome.html skipped, even if stat reports exists #220

Open
mira-miracoli opened this issue Nov 7, 2024 · 0 comments
Open

Custom welcome.html skipped, even if stat reports exists #220

mira-miracoli opened this issue Nov 7, 2024 · 0 comments

Comments

@mira-miracoli
Copy link
Collaborator

This task checks, if a custom subdomain welcome.html is present and registers the result in custom_welcome

- name: Check if welcome.html is present in files
ansible.builtin.stat:
path: "{{ galaxy_themes_ansible_file_path }}/{{ subdomain.name }}/static/welcome.html"
register: custom_welcome

However, it appears that the task despite that, skipped and the following task that checks for this variable is not executed:
- name: Copy custom welcome.html
ansible.builtin.copy:
src: "{{ item }}"
dest: "{{ galaxy_themes_static_path }}/static-{{ subdomain.name }}/welcome.html/index.html"
mode: '0644'
owner: "{{ __galaxy_privsep_user_name }}"
group: "{{ __galaxy_privsep_user_group }}"
with_fileglob: "{{ galaxy_themes_ansible_file_path }}/{{ subdomain.name }}/static/welcome.html"
when: custom_welcome.stat.exists

Could this maybe due to ansible behaviour, that ansible forgets about the registered result, when it executes tasks from an imported file?
I think that I have checked all other possible reasons and this seems to be the only one left, but maybe I am missing something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant