diff --git a/ansible/roles/gitea/files/robots.txt b/ansible/roles/gitea/files/robots.txt new file mode 100644 index 0000000..5c427bb --- /dev/null +++ b/ansible/roles/gitea/files/robots.txt @@ -0,0 +1,4 @@ +User-agent: * + +# Ignore mirrored repos +Disallow: /mirror/ diff --git a/ansible/roles/gitea/tasks/main.yml b/ansible/roles/gitea/tasks/main.yml index 2554203..5e0d563 100644 --- a/ansible/roles/gitea/tasks/main.yml +++ b/ansible/roles/gitea/tasks/main.yml @@ -27,3 +27,12 @@ owner: "{{ docker_user.name }}" notify: restart gitea become: true + +- name: Install robots.txt + template: + src: files/robots.txt + dest: "{{ app_data_dir }}/gitea/data/custom/robots.txt" + mode: "{{ docker_compose_file_mask }}" + owner: "{{ docker_user.name }}" + notify: restart gitea + become: true