From 64f51d2c81f25e352c13e17179aa9fa2ceed94e8 Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: May 07 2023 19:13:34 +0000 Subject: Merge branch 'oom-oo' into 'production' Initialize oom.opensuse.org See merge request infra/salt!617 --- diff --git a/pillar/role/web_static.sls b/pillar/role/web_static.sls index 3032d8a..793063a 100644 --- a/pillar/role/web_static.sls +++ b/pillar/role/web_static.sls @@ -1,4 +1,4 @@ -{% set websites = ['html5test', 'people', 'shop', 'static', 'studioexpress', 'lizards', 'www', 'community', 'ignite'] %} +{% set websites = ['html5test', 'people', 'shop', 'static', 'studioexpress', 'lizards', 'www', 'community', 'ignite', 'oom'] %} include: - role.common.nginx diff --git a/salt/profile/oomanalyser.sls b/salt/profile/oomanalyser.sls new file mode 100644 index 0000000..b70648a --- /dev/null +++ b/salt/profile/oomanalyser.sls @@ -0,0 +1,12 @@ +include: + - .static.docroot + +OOMAnalyser: + pkg.installed + +link_oom_vhost: + file.symlink: + - name: /srv/www/vhosts/oom.opensuse.org + - target: /srv/www/OOMAnalyser + - require: + - file: /srv/www/vhosts/ diff --git a/salt/profile/static/docroot.sls b/salt/profile/static/docroot.sls index 410239a..5116ef4 100644 --- a/salt/profile/static/docroot.sls +++ b/salt/profile/static/docroot.sls @@ -1,10 +1,13 @@ {% set websites = salt['pillar.get']('profile:web_static:websites') %} +{% set exclusions = ['oom'] %} /srv/www/vhosts/: file.directory {% for website in websites %} +{%- if not website in exclusions %} /srv/www/vhosts/{{ website }}.opensuse.org: file.directory: - user: web_static +{%- endif %} {% endfor %} diff --git a/salt/role/web_static.sls b/salt/role/web_static.sls index 0b708d1..8a37e5d 100644 --- a/salt/role/web_static.sls +++ b/salt/role/web_static.sls @@ -2,3 +2,4 @@ include: - profile.web.server.nginx - profile.static.user - profile.static.docroot + - profile.oomanalyser