3 # This module manages the initial configuration of apt.
6 # Both of the parameters listed here are not required in general and were
7 # added for use cases related to development environments.
8 # disable_keys - disables the requirement for all packages to be signed
9 # always_apt_update - rather apt should be updated on every run (intended
10 # for development environments where package updates are frequent
18 $always_apt_update = false,
19 $disable_keys = undef,
29 $refresh_only_apt_update = $always_apt_update? {
34 package { "python-software-properties": }
36 file { "sources.list":
37 path => "${apt::params::root}/sources.list",
44 true => "# Repos managed by puppet.\n",
48 file { "sources.list.d":
49 path => "${apt::params::root}/sources.list.d",
58 command => "${apt::params::provider} update",
59 subscribe => [ File["sources.list"], File["sources.list.d"] ],
60 refreshonly => $refresh_only_apt_update,
66 content => "APT::Get::AllowUnauthenticated 1;\n",
68 path => "/etc/apt/apt.conf.d/99unauth",
74 path => "/etc/apt/apt.conf.d/99unauth",
77 undef: { } # do nothing
78 default: { fail("Valid values for disable_keys are true or false") }
82 file { 'configure-apt-proxy':
83 path => '/etc/apt/apt.conf.d/proxy',
84 content => "Acquire::http::Proxy \"http://${proxy_host}:${proxy_port}\";",