Skip to content

Commit

Permalink
Make inoticoming setup optional
Browse files Browse the repository at this point in the history
Add an additional configuration variable reprepro_enable_inoticoming
(default True) to enable inoticoming. This allows one to disable the
HTTP PUT upload for repositories that don't need it because they either
don't allow uploads at all or upload by other methods (eg. sftp).
  • Loading branch information
gaudenz committed Aug 7, 2017
1 parent 09f127e commit 62157fa
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 18 deletions.
40 changes: 22 additions & 18 deletions defaults/main.yml
Expand Up @@ -74,6 +74,9 @@ reprepro_spool: '{{ (ansible_local.root.spool
# Directory where uploaded packages are stored
reprepro_upload: '{{ reprepro_spool + "/incoming" }}'

# Wheter to configure Nginx with DAV and inoticoming for uploads
reprepro_enable_inoticoming: True

# Directory where reprepro will create its repository structure.
# It will be served publicly by a HTTP/HTTPS webserver.
reprepro_repository_path: '/srv/www/sites/{{ reprepro_domains[0] }}/public'
Expand Down Expand Up @@ -608,24 +611,25 @@ reprepro_nginx_server_https:
options: |
client_max_body_size {{ reprepro_max_body_size }}M;
location:
'/': |
try_files $uri $uri/ =404;
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
'/upload': |
alias {{ reprepro_upload }};
dav_access all:rw;
dav_methods PUT;
limit_except PUT {
deny all;
}
location_allow:
'/': '{{ reprepro_allow }}'
'/upload': '{{ reprepro_allow_upload }}'
location_list:
- pattern: '/'
options: |
try_files $uri $uri/ =404;
autoindex on;
autoindex_exact_size off;
autoindex_localtime on;
allow: '{{ reprepro_allow }}'

- pattern: '/upload'
options: |
alias {{ reprepro_upload }};
dav_access all:rw;
dav_methods PUT;
limit_except PUT {
deny all;
}
allow: '{{ reprepro_allow_upload }}'
enabled: '{{ reprepro_enable_inoticoming }}'

# Debian previous releases
reprepro_debian_previous:
Expand Down
1 change: 1 addition & 0 deletions tasks/main.yml
Expand Up @@ -7,6 +7,7 @@
- include: reprepro_init.yml

- include: configure_inoticoming.yml
when: reprepro_enable_inoticoming

- include: snapshot_gnupg.yml

0 comments on commit 62157fa

Please sign in to comment.