| OLD | NEW |
| 1 # == Type: adblockplus::web::fileserver::repository | 1 # == Type: adblockplus::web::fileserver::repository |
| 2 # | 2 # |
| 3 # Manage a repository on a fileserver. | 3 # Manage a repository on a fileserver. |
| 4 # | 4 # |
| 5 # A repository is a site where a group of people can upload and artifacts. | 5 # A repository is a site where a group of people can upload and artifacts. |
| 6 # | 6 # |
| 7 # In its current form, a repository is simply a directory exposed on a web | 7 # In its current form, a repository is simply a directory exposed on a web |
| 8 # server. This may evolve to make use of more advanced repositories in the | 8 # server. This may evolve to make use of more advanced repositories in the |
| 9 # future (proxy to repository manager, or 3rd-party service, etc). | 9 # future (proxy to repository manager, or 3rd-party service, etc). |
| 10 # | 10 # |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 default => "$name.$adblockplus::web::fileserver::domain", | 39 default => "$name.$adblockplus::web::fileserver::domain", |
| 40 } | 40 } |
| 41 $auth_filename = "${::adblockplus::directory}/htpasswd/${name}" | 41 $auth_filename = "${::adblockplus::directory}/htpasswd/${name}" |
| 42 | 42 |
| 43 nginx::hostconfig {"$repository_host": | 43 nginx::hostconfig {"$repository_host": |
| 44 global_config => template("web/global.conf.erb"), | 44 global_config => template("web/global.conf.erb"), |
| 45 content => template("adblockplus/web/fileserver.conf.erb"), | 45 content => template("adblockplus/web/fileserver.conf.erb"), |
| 46 is_default => false, | 46 is_default => false, |
| 47 certificate => $adblockplus::web::fileserver::certificate, | 47 certificate => $adblockplus::web::fileserver::certificate, |
| 48 private_key => $adblockplus::web::fileserver::private_key, | 48 private_key => $adblockplus::web::fileserver::private_key, |
| 49 log => 'access_log_fileserver', | 49 log => "access_log_$repository_host", |
| 50 } | 50 } |
| 51 | 51 |
| 52 if $auth_file != undef { | 52 if $auth_file != undef { |
| 53 ensure_resource('file', $auth_filename, merge({ | 53 ensure_resource('file', $auth_filename, merge({ |
| 54 ensure => ensure_file_state($ensure), | 54 ensure => ensure_file_state($ensure), |
| 55 }, $auth_file)) | 55 }, $auth_file)) |
| 56 } | 56 } |
| 57 | 57 |
| 58 group {"$group_name": | 58 group {"$group_name": |
| 59 ensure => $ensure, | 59 ensure => $ensure, |
| (...skipping 17 matching lines...) Expand all Loading... |
| 77 | 77 |
| 78 realize(File[$adblockplus::directory]) | 78 realize(File[$adblockplus::directory]) |
| 79 | 79 |
| 80 file {"/var/www/$repository_host": | 80 file {"/var/www/$repository_host": |
| 81 ensure => ensure_symlink_state($ensure), | 81 ensure => ensure_symlink_state($ensure), |
| 82 target => "$repository_directory", | 82 target => "$repository_directory", |
| 83 require => File["$repository_directory"], | 83 require => File["$repository_directory"], |
| 84 } | 84 } |
| 85 } | 85 } |
| 86 | 86 |
| OLD | NEW |