diff --git a/salt/hg/init.sls b/salt/hg/init.sls index 13d45efe..7fa7bbea 100644 --- a/salt/hg/init.sls +++ b/salt/hg/init.sls @@ -58,6 +58,44 @@ hg-user: - file_mode: "0755" - require: - user: hg-user + - exclude_pat: + - python*.wsgi + +{% if grains["oscodename"] == "noble" %} +/srv/hg/wsgi/python3.wsgi: + file.managed: + - source: salt://hg/files/hg/wsgi/python3.wsgi + - user: hg + - mode: "0755" + - require: + - file: /srv/hg/wsgi +{% else %} +/srv/hg/wsgi/python.wsgi: + file.managed: + - source: salt://hg/files/hg/wsgi/python.wsgi + - user: hg + - mode: "0755" + - require: + - file: /srv/hg/wsgi +{% endif %} + +{% if grains["oscodename"] == "noble" %} +/srv/hg/wsgi/python.wsgi: + file.managed: + - source: salt://hg/files/hg/wsgi/python3.wsgi + - user: hg + - mode: "0755" + - require: + - file: /srv/hg/wsgi +{% else %} +/srv/hg/wsgi/python.wsgi: + file.managed: + - source: salt://hg/files/hg/wsgi/python.wsgi + - user: hg + - mode: "0755" + - require: + - file: /srv/hg/wsgi +{% endif %} /srv/hg/wsgi/python.wsgi: file.managed: