diff options
Diffstat (limited to 'roles')
-rw-r--r-- | roles/gitano_server/files/robots.txt | 2 | ||||
-rw-r--r-- | roles/gitano_server/tasks/cgit.yml | 8 | ||||
-rw-r--r-- | roles/gitano_server/templates/apache-cgit-host.j2 | 1 |
3 files changed, 11 insertions, 0 deletions
diff --git a/roles/gitano_server/files/robots.txt b/roles/gitano_server/files/robots.txt new file mode 100644 index 0000000..1f53798 --- /dev/null +++ b/roles/gitano_server/files/robots.txt @@ -0,0 +1,2 @@ +User-agent: * +Disallow: / diff --git a/roles/gitano_server/tasks/cgit.yml b/roles/gitano_server/tasks/cgit.yml index ff0375a..05e92cb 100644 --- a/roles/gitano_server/tasks/cgit.yml +++ b/roles/gitano_server/tasks/cgit.yml @@ -46,6 +46,14 @@ mode: 0755 with_items: "{{ cgit_hosts }}" notify: restart apache2 + +- name: install robots.txt for cgi + copy: + src: robots.txt + dest: /usr/share/cgit/robots.txt + owner: root + group: root + mode: 0444 - name: enable virtualhosts shell: "a2ensite {{ item }}" diff --git a/roles/gitano_server/templates/apache-cgit-host.j2 b/roles/gitano_server/templates/apache-cgit-host.j2 index 2f9eeb0..522c3c9 100644 --- a/roles/gitano_server/templates/apache-cgit-host.j2 +++ b/roles/gitano_server/templates/apache-cgit-host.j2 @@ -18,6 +18,7 @@ DirectoryIndex /cgi-bin/cgit.cgi Alias /cgit.png /usr/share/cgit/cgit.png Alias /cgit.css /usr/share/cgit/cgit.css + Alias /robots.txt /usr/share/cgit/robots.txt <Directory "/home/git/repos"> Options FollowSymlinks Indexes AllowOverride none |