Saltstack Official Apt-Cacher Formula
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

279 lines
12KB

  1. # This file is managed by Salt, do not edit by hand!!
  2. {% set apt_cacher = pillar.get('apt-cacher', {}) -%}
  3. #################################################################################
  4. # This is the config file for apt-cacher. On most Debian systems you can safely #
  5. # leave the defaults alone. #
  6. # #
  7. # Commented defaults or examples are given. They can be changed here, or #
  8. # overridden using a fragment placed in ./conf.d/ #
  9. #################################################################################
  10. ### GENERAL ###
  11. # The location of the local cache/working directory. This can become quite
  12. # large, so make sure it is somewhere with plenty of space.
  13. #
  14. #cache_dir = /var/cache/apt-cacher
  15. # The directory to use for apt-cacher access and error logs.
  16. # The access log records every request in the format:
  17. #
  18. # date-time|PID|client IP address|HIT/HEAD/MISS/EXPIRED/NOTMOD|object size|object name
  19. #
  20. # The error log is slightly more free-form, and is also used for debug messages
  21. # if debug mode is turned on.
  22. #
  23. #log_dir = /var/log/apt-cacher
  24. # The email address of the administrator is displayed in the info page and
  25. # traffic reports.
  26. #
  27. admin_email = {{ apt_cacher.get('admin_email', 'root@localhost') }}
  28. # Daemon port setting, only useful in stand-alone mode. You need to run the
  29. # daemon as root to use privileged ports (<1024).
  30. #
  31. # For standalone daemon auto startup settings please edit the file
  32. # /etc/default/apt-cacher.
  33. #
  34. #daemon_port = 3142
  35. # Optional settings, user and group to run the daemon as. Make sure they have
  36. # sufficient permissions within the cache and log directories. Comment the
  37. # settings to run apt-cacher as the invoking user.
  38. #
  39. group = www-data
  40. user = www-data
  41. # optional setting, binds the listening daemon to specified IP(s).
  42. #
  43. #daemon_addr = localhost
  44. # Apt-cacher can be used in offline mode which just uses files already cached,
  45. # but doesn't make any new outgoing connections by setting this to 1.
  46. #
  47. #offline_mode = 1
  48. # To enable data checksumming, install libberkeleydb-perl and set this option to
  49. # 1. Then wait until the Packages/Sources files have been refreshed once (and so
  50. # the database has been built up). You can also delete them from the cache to
  51. # trigger the database update.
  52. #
  53. #checksum = 1
  54. # Importing checksums from new index files into the checksum database can cause
  55. # high CPU usage on slower systems. This option sets a limit to the number of
  56. # index files that are imported simultaneously, thereby limiting CPU load
  57. # average, but, possibly, taking longer. Set to 0 for no limit.
  58. #
  59. #concurrent_import_limit = 1
  60. # CGI mode is deprecated.
  61. #
  62. # Send a 410 (Gone) HTTP message with the specified text when accessed via
  63. # CGI. Useful to tell users to adapt their sources.list files when the
  64. # apt-cacher server is being relocated (via apt-get's error messages while
  65. # running "update")
  66. #
  67. #cgi_advise_to_use = Please use http://cacheserver:3142/ as apt-cacher access URL
  68. #cgi_advise_to_use = Server relocated. To change sources.list, run
  69. # perl -pe "s,/apt-cacher??,:3142," -i /etc/apt/sources.list
  70. #
  71. # To further facilitate migration from CGI to daemon mode this setting will
  72. # automatically redirect incoming CGI requests to the specified daemon URL.
  73. #
  74. #cgi_redirect = http://localhost:3142/
  75. ### UPSTREAM PROXY ###
  76. # Apt-cacher can pass all its requests to an external HTTP proxy like Squid,
  77. # which could be very useful if you are using an ISP that blocks port 80 and
  78. # requires all web traffic to go through its proxy. The format is
  79. # 'hostname:port', eg: 'proxy.example.com:8080'.
  80. #
  81. #http_proxy = proxy.example.com:8080
  82. # External http proxy sometimes need authentication to get full access. The
  83. # format is 'username:password'.
  84. #
  85. #http_proxy_auth = proxyuser:proxypass
  86. # Use of the configured external proxy can be turned on or off with this flag.
  87. # Value should be either 0 (off) or 1 (on).
  88. #
  89. #use_proxy = 0
  90. # Use of external proxy authentication can be turned on or off with this flag.
  91. # Value should be either 0 (off) or 1 (on).
  92. #
  93. #use_proxy_auth = 0
  94. # This sets the interface to use for the upstream connection.
  95. # Specify an interface name, an IP address or a host name.
  96. # If unset, the default route is used.
  97. #
  98. #interface = eth0
  99. # Rate limiting sets the maximum bandwidth in bytes per second to use for
  100. # fetching packages. Use 0 value for no rate limiting.
  101. #
  102. #limit = 0
  103. ### ACCESS and SECURITY ###
  104. # Server mapping - this allows mapping virtual paths that appear in the access
  105. # URL to real server names. The syntax is the part of the beginning of the URL
  106. # to replace (the key), followed by a list of mirror URLs, all space
  107. # separated. Multiple mappings are separated by semicolons or commas, as
  108. # usual. Note that you need to specify all keys (or use the 'PATH_MAP'
  109. # shorthand) in the allowed_locations option, if you make use of it. Also note
  110. # that the paths should not overlap each other.
  111. #
  112. # The keys are also used to separate the caching of multiple distributions
  113. # within a single apt-cacher instance if distinct_namespaces is also set.
  114. #
  115. #path_map = debian ftp.uni-kl.de/pub/linux/debian ftp2.de.debian.org/debian ;
  116. # ubuntu archive.ubuntu.com/ubuntu ;
  117. # security security.debian.org/debian-security ftp2.de.debian.org/debian-security
  118. #
  119. # There are 2 default internal path_map settings for the Debian and Ubuntu
  120. # changelog servers which will be merged with this option.
  121. #
  122. # debian-changelogs packages.debian.org
  123. # ubuntu-changelogs changelogs.ubuntu.com
  124. #
  125. # These can be overridden by specifying an alternative mirror for that key, or
  126. # deleted by just specifying the key with no mirror.
  127. #
  128. #path_map = debian-changelogs
  129. # From version 1.7.0 there is support for caching multiple distibutions (eg
  130. # Debian and Ubuntu) within the same apt-cacher instance. Enable this by setting
  131. # distinct_namespaces to 1. Distribution package files are cached in separate
  132. # directories whose names are derived from the relevant path_map key. So
  133. # generally there will be a path_map key => server(s) setting for each
  134. # distribution that is cached. Having enabled distinct_namespaces, existing
  135. # packages can be imported into the correct directory by running (as root)
  136. #
  137. # /usr/share/apt-cacher/apt-cacher-import.pl -u {cache_dir}/packages
  138. #
  139. #distinct_namespaces = 0
  140. # If the apt-cacher machine is directly exposed to the Internet and you are
  141. # worried about unauthorised machines fetching packages through it, you can
  142. # specify a list of IP addresses which are allowed to use it and another list of
  143. # IP addresses which are prohibited.
  144. #
  145. # Localhost (127.0.0.1, ::1 and ::7f00:1) are always allowed. Other addresses
  146. # must be matched by allowed_hosts and not by denied_hosts to be permitted to
  147. # use the cache. Setting allowed_hosts to "*" means "allow all" (which was the
  148. # default before version 1.7.0). The default is now ''.
  149. #
  150. # The format is a comma-separated list containing addresses, optionally with
  151. # masks (like 10.0.0.0/24 or 10.0.0.0/255.255.255.0), or ranges of addresses
  152. # (two addresses separated by a hyphen with no masks, specifying a valid subnet,
  153. # like '192.168.0.0-63' or '192.168.0.0 - 192.168.0.63') or a DNS resolvable
  154. # hostname. The corresponding IPv6 options allowed_hosts_6 and denied_hosts_6
  155. # are deprecated (but will still be honoured, if set). IPv6 addresses can now be
  156. # added directly to allowed_hosts and denied_hosts along with IPv4 addresses.
  157. allowed_hosts = {{ apt_cacher.get('allowed_hosts', '*') }}
  158. denied_hosts = {{ apt_cacher.get('denied_hosts', '') }}
  159. # Only allow HTTPS/SSL proxy CONNECT to hosts or IPs which match an item in this
  160. # list.
  161. #
  162. #allowed_ssl_locations =
  163. # Only allow HTTPS/SSL proxy CONNECT to ports which match an item in this list.
  164. # Adding further items to this option can pose a significant security risk. DO
  165. # NOT do it unless you understand the full implications.
  166. #
  167. #allowed_ssl_ports = 443
  168. # Optional setting to limit access to upstream mirrors based on server names in
  169. # the URLs. This is matched before any path_map settings are expanded. If
  170. # 'PATH_MAP' in included in this option, it will be expanded to the keys of the
  171. # path_map setting. Note these items are strings, not regexps.
  172. #
  173. #allowed_locations = ftp.uni-kl.de, ftp.nerim.net, debian.tu-bs.de/debian
  174. #allowed_locations = ftp.debian.org, PATH_MAP
  175. #allowed_locations = PATH_MAP
  176. # List of Ubuntu release names used to expand UBUNTU_RELEASE_NAMES in
  177. # installer_files_regexp (see below). This is required to allow the Ubuntu
  178. # installer to fetch upgrade information. As the naming scheme is unpredictable,
  179. # new release names need to be added to this list.
  180. #
  181. #ubuntu_release_names = dapper, edgy, feisty, gutsy, hardy, intrepid, jaunty, karmic, lucid, maverick, natty, oneiric, precise
  182. ### HOUSEKEEPING ###
  183. # Apt-cacher can generate usage reports every 24 hours if you set this directive
  184. # to 1. You can view the reports in a web browser by pointing to your cache
  185. # machine with 'report' on the end, like this:
  186. #
  187. # http://yourcache.example.com:3142/report
  188. #
  189. # Generating reports is very fast even with many thousands of logfile lines, so
  190. # you can safely turn this on without creating much additional system load.
  191. #
  192. #generate_reports = 1
  193. # Apt-cacher can clean up its cache directory every 24 hours if you set this
  194. # directive to 1. Cleaning the cache can take some time to run (generally in the
  195. # order of a few minutes) and removes all package files that are not mentioned
  196. # in any existing 'Packages' lists. This has the effect of deleting packages
  197. # that have been superseded by an updated 'Packages' list.
  198. #
  199. #clean_cache = 1
  200. ### INTERNALS ###
  201. # Debug mode makes apt-cacher write a lot of extra debug information to the
  202. # error log (whose location is defined with the 'log_dir' directive). Leave
  203. # this off unless you need it, or your error log will get very big. Acceptable
  204. # values are 0 or an integer up to 7. See man apt-cacher (1) for further
  205. # details.
  206. #
  207. #debug = 0
  208. # You shouldn't need to change anything below here. If you do, ensure you
  209. # understand the full implications of doing so.
  210. # Permitted package files -- this is a perl regular expression which matches all
  211. # package-type files (files that are uniquely identified by their filename).
  212. #
  213. #package_files_regexp = (?:^[-+.a-z0-9]+_(?:\d:)?[-+.~a-zA-Z0-9]+(?:_[-a-z0-9]+\.(?:u|d)?deb|\.dsc|\.tar(?:\.gz|\.bz2|\.xz)|\.diff\.gz)|\.rpm|index\.db-.+\.gz|\.jigdo|\.template)$
  214. # Permitted APT pdiff files -- this is a perl regular expression which matches
  215. # APT pdiff files which are ed(1) scripts used to patch index files rather than
  216. # redownloading the whole file afresh.
  217. #
  218. #pdiff_files_regexp = ^2\d{3}-\d{2}-\d{2}-\d{4}\.\d{2}\.gz$
  219. # Permitted Index files -- this is the perl regular expression which matches all
  220. # index-type files (files that are uniquely identified by their full path and
  221. # need to be checked for freshness).
  222. #
  223. #index_files_regexp = ^(?:Index(?:\.bz2)?|Packages(?:\.gz|\.bz2)?|Release(?:\.gpg)?|InRelease|Sources(?:\.gz|\.bz2)?|Contents-(?:[a-z]+-)?[a-zA-Z0-9]+\.gz|(?:srclist|pkglist)\.[a-z-]+\.bz2|release(?:\.gz|\.bz2)?|Translation-[a-z]{2,3}(?:_[A-Z]{2})?(?:\.gz|\.bz2|\.xz)?)$
  224. # Permitted installer files -- this is the perl regular expression which matches
  225. # all installer-type files (files that are uniquely identified by their full
  226. # path but don’t need to be checked for freshness). These are typically files
  227. # used by Debian/Ubuntu Installer, Debian Live and apt. Within this option, the
  228. # shorthand 'UBUNTU_RELEASE_NAMES' will be expanded to the list configured in
  229. # ubuntu_release_names as regexp alternatives.
  230. #
  231. installer_files_regexp = ^(?:vmlinuz|linux|initrd\.gz|changelog|NEWS.Debian|[a-z]+\.tar\.gz(?:\.gpg)?|UBUNTU_RELEASE_NAMES\.tar\.gz(?:\.gpg)?|(?:Devel|EOL)?ReleaseAnnouncement(?:\.html)?|meta-release(?:-lts)?(?:-(?:development|proposed))?)$
  232. # Perl regular expression which matches Index files from which to read checksums
  233. # if checksum is enabled.
  234. #
  235. #checksum_files_regexp = ^(?:Packages(?:\.gz|\.bz2)?|Sources(?:\.gz|\.bz2)?|(?:In)?Release|Index(?:\.bz2)?)$
  236. # Perl regular expression which matches URLs to be permitted for Debian bugs
  237. # SOAP requests as made by apt-listbugs(1).
  238. #
  239. #soap_url_regexp = ^(?:http://)?bugs\.debian\.org(?::80)?/cgi-bin/soap.cgi$