From fc9f1c32c92d72423951f3ec8e9a7f74739cfba3 Mon Sep 17 00:00:00 2001 From: Theo Chatzimichos Date: Jul 27 2017 12:01:07 +0000 Subject: Merge branch 'cboltz-wiki-robots' into 'production' add default robots.txt for all wikis See merge request !35 --- diff --git a/pillar/role/wiki.sls b/pillar/role/wiki.sls index ce0c11f..e9c05f6 100644 --- a/pillar/role/wiki.sls +++ b/pillar/role/wiki.sls @@ -20,7 +20,7 @@ mediawiki_1_27: # dbpass: not_in_salt_yet # lang: en # readonly_msg: 'This wiki is in read-only mode for maintenance!' - # robots: robots-disallow.txt # filename in salt/profile/wiki/files/ + # robots: robots-disallow.txt # filename in salt/profile/wiki/files/, defaults to 'robots.txt' # site_notice: 'This wiki has been moved and updated recently. If you encounter any issue, please let us know by mail to admin@opensuse.org.' cn: dbpass: not_in_salt_yet diff --git a/salt/profile/wiki/docroot.sls b/salt/profile/wiki/docroot.sls index e4a9fb4..1870c7b 100644 --- a/salt/profile/wiki/docroot.sls +++ b/salt/profile/wiki/docroot.sls @@ -51,11 +51,9 @@ - source: salt://profile/wiki/files/wiki_settings.php - template: jinja -{% if data.get('robots') %} /srv/www//{{ wiki }}.opensuse.org/public/robots.txt: file.managed: - - source: salt://profile/wiki/files/{{ data.robots }} -{% endif %} + - source: salt://profile/wiki/files/{{ data.get('robots', 'robots.txt') }} {%endfor%} diff --git a/salt/profile/wiki/files/robots.txt b/salt/profile/wiki/files/robots.txt new file mode 100644 index 0000000..eafcb16 --- /dev/null +++ b/salt/profile/wiki/files/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: /index.php