Salt: ensure that the site-icons.css file exists

The generate_site_icons_css cronjob will create this file, but the site
won't work before it exists, so there's a (less than 5 min) gap where
the site is broken when first set up. This probably won't be noticeable
in dev/prod setups, but breaks things like CI setups where everything is
getting created freshly each time.

This makes sure that the file always exists on initial setup and
whenever the Salt states are re-run.
This commit is contained in:
Deimos
2020-07-12 14:33:15 -06:00
parent c330811fc9
commit e85dfa2492

View File

@@ -1,4 +1,13 @@
{% from 'common.jinja2' import app_dir, bin_dir %}
{% from 'common.jinja2' import app_dir, app_username %}
# webassets will crash the site unless this file exists, make sure it's always there
{{ app_dir }}/static/css/site-icons.css:
file.managed:
- user: {{ app_username }}
- group: {{ app_username }}
- mode: 644
- create: True
- replace: False
/etc/systemd/system/webassets.service:
file.managed: