diff options
Diffstat (limited to 'code/environments/production/modules/apt/templates')
6 files changed, 46 insertions, 0 deletions
diff --git a/code/environments/production/modules/apt/templates/15update-stamp.epp b/code/environments/production/modules/apt/templates/15update-stamp.epp new file mode 100644 index 0000000..14ead83 --- /dev/null +++ b/code/environments/production/modules/apt/templates/15update-stamp.epp @@ -0,0 +1 @@ +APT::Update::Post-Invoke-Success {"touch /var/lib/apt/periodic/update-success-stamp 2>/dev/null || true";}; diff --git a/code/environments/production/modules/apt/templates/_conf_header.epp b/code/environments/production/modules/apt/templates/_conf_header.epp new file mode 100644 index 0000000..bfa365e --- /dev/null +++ b/code/environments/production/modules/apt/templates/_conf_header.epp @@ -0,0 +1 @@ +// This file is managed by Puppet. DO NOT EDIT. diff --git a/code/environments/production/modules/apt/templates/_header.epp b/code/environments/production/modules/apt/templates/_header.epp new file mode 100644 index 0000000..487e581 --- /dev/null +++ b/code/environments/production/modules/apt/templates/_header.epp @@ -0,0 +1 @@ +# This file is managed by Puppet. DO NOT EDIT. diff --git a/code/environments/production/modules/apt/templates/pin.pref.epp b/code/environments/production/modules/apt/templates/pin.pref.epp new file mode 100644 index 0000000..7991332 --- /dev/null +++ b/code/environments/production/modules/apt/templates/pin.pref.epp @@ -0,0 +1,26 @@ +<%- | $name, $pin_release, $release, $codename, $release_version, $component, $originator, $label, $version, $origin, $explanation, $packages_string, $priority | -%> +<%- +$pin = +if $pin_release.length > 0 { + $options = [ + if $release { "a=${release}" }, + if $codename { "n=${codename}" }, + if $release_version { "v=${release_version}"}, + if $component { "c=${component}" }, + if $originator { "o=${originator}" }, + if $label { "l=${label}" }, + ].filter |$x| { $x != undef } + "release ${options.join(', ')}" } + +elsif $version and "${version}".length > 0 { + "version ${version}" } +elsif $origin and $origin.length > 0 { + "origin ${origin}" } +else { + "release a=${name}" #Default value +} +-%> +Explanation: <%= $explanation %> +Package: <%= $packages_string %> +Pin: <%= $pin %> +Pin-Priority: <%= $priority %> diff --git a/code/environments/production/modules/apt/templates/proxy.epp b/code/environments/production/modules/apt/templates/proxy.epp new file mode 100644 index 0000000..ee663cb --- /dev/null +++ b/code/environments/production/modules/apt/templates/proxy.epp @@ -0,0 +1,7 @@ +<%- | Hash $proxies | -%> +Acquire::http::proxy "http://<%= $proxies['host'] %>:<%= $proxies['port'] %>/"; +<%- if $proxies['https'] { %> +Acquire::https::proxy "https://<%= $proxies['host'] %>:<%= $proxies['port'] %>/"; +<%- } elsif $proxies['direct'] { -%> +Acquire::https::proxy "DIRECT"; +<%- } -%> diff --git a/code/environments/production/modules/apt/templates/source.list.epp b/code/environments/production/modules/apt/templates/source.list.epp new file mode 100644 index 0000000..4b29726 --- /dev/null +++ b/code/environments/production/modules/apt/templates/source.list.epp @@ -0,0 +1,10 @@ +<%- | String $comment, Hash $includes, $opt_architecture, Boolean $allow_unsigned, $location, $release, String $repos | -%> +# <%= $comment %> +<%- if $includes['deb'] { -%> +deb <%- if ($opt_architecture or $allow_unsigned) {-%> + [<%- if ($opt_architecture) {%>arch=<%= $opt_architecture %><% } %><%if ($opt_architecture and $allow_unsigned) {%> <% }%><% if ($allow_unsigned) {%>trusted=yes<% } %>] <%- } %> <%= $location %> <%= $release %> <%= $repos %> +<%- } -%> +<%- if $includes['src'] { -%> +deb-src <%- if $opt_architecture or $allow_unsigned { -%> + [<%- if ($opt_architecture) {%>arch=<%= $opt_architecture %><% } %><%if ($opt_architecture and $allow_unsigned) {%> <% }%><% if ($allow_unsigned) {%>trusted=yes<% } %>] <%- } %> <%= $location %> <%= $release %> <%= $repos %> +<%- } -%> |