Commit graph

87 commits

Author SHA1 Message Date
Gabriel Filion
26714ae4d2 Include the protocol in the proxy URL
The current proxy_client template makes it possible to communicate with
the proxy only via HTTP. Add the protocol to the variable so that it's
possible to change the protocol.

Signed-off-by: Gabriel Filion <lelutin@gmail.com>
2010-10-25 14:14:26 -04:00
Gabriel Filion
e2578c3b98 Add $main_apt_source
Currently, it's either we use the default source that's hardcoded in the
sources.list template or we redefine entirely this template.

Make it easier to just change the URL of the apt source while using the
rest of the default template by adding a $main_apt_source variable.

Signed-off-by: Gabriel Filion <lelutin@gmail.com>
2010-10-25 14:12:18 -04:00
Gabriel Filion
3c88b19dd3 Remove the now unused $apt_clean variable
This variable was deprecated in favor of using a list of file sources.
to change the value of the 'clean' property, you can either define a
file '03clean' in a site-apt module, or a per-host '$fqdn/03clean' file
in the same site-apt module.

Also, move the moduledir stuff below nearer to where it's actually used.

Signed-off-by: Gabriel Filion <lelutin@gmail.com>
2010-10-25 11:44:41 -04:00
Gabriel Filion
27d5808299 rename things for easier understanding
remove the use of _snippet in names (except for preferences_snippet) so
that they represent directly a resource name.

rename custom_sources_template to sources_list.

modify sources_list to make it more flexible (gives the opportunity to
provide sources or content). this changes its behaviour in that the name
is now the name of the file in sources.list.d

rename proxy-client to proxy_client to use the same standard for its
name as the other classes.

Signed-off-by: Gabriel Filion <lelutin@gmail.com>
2010-10-25 01:44:04 -04:00
Gabriel Filion
d97a49b7b2 refactor: simplify and remove inline content
Simplifications: make apt_conf_snippet repeat less code, make code that
generates sources.list more concise.

Remove all inline content in favor of templates and static files.
The ability to include sources for static files was needed for
the main 'preferences' file, so it was added to the preferences_snippet
define.

Signed-off-by: Gabriel Filion <lelutin@gmail.com>
2010-10-25 00:14:33 -04:00
Gabriel Filion
ac76a5d52d Add apt_conf_snippet and use it where possible
With the new define, it's easy to add an apt.conf snippet in apt.conf.d
It accepts either 'sources' to get a static file or 'content' to define
content inline or with the help of a template.

Put it to use where we create files in apt.conf.d

Finally, fix the dependancy to the apt_config file (however, I don't see
the need for this dependancy)

Signed-off-by: Gabriel Filion <lelutin@gmail.com>
2010-10-24 09:17:09 -04:00
Gabriel Filion
e22029433a Move default_sources_list into apt class
The contents of the file default_sources_list.pp is used in only one
place. Remove the file and move its contents inside the apt class in
order to have one less useless depth level.

Signed-off-by: Gabriel Filion <lelutin@gmail.com>
2010-10-24 07:37:29 -04:00
nadir
5bf01f148d notify => Exec['refresh_apt'] 2010-10-22 19:18:12 +02:00
nadir
851d20a7b6 merged with immerda/master 2010-10-22 19:17:57 +02:00
mh
e2ac1b3d8d Merge remote branch 'lelutin/master'
Integrate no custom preference into our new
way to manage the preferences.

Conflicts:
	README
	manifests/default_preferences.pp
	manifests/init.pp
2010-10-21 01:59:41 +02:00
Gabriel Filion
4dbcd09281 Make it possible to ensure preferences is absent
The current code makes it mandatory to have a file /etc/apt/preferences
present. In the event that this file is empty or contains a space,
apt-get update cannot execute.

Add a case with the special value "false" that ensures the file does not
exist.

Signed-off-by: Gabriel Filion <lelutin@gmail.com>
2010-10-18 01:51:16 -04:00
Gabriel Filion
9736578481 Remove unnecessary exec
When $custom_key_dir has not been assigned any value, a useless exec of
/bin/true is run. Remove this by using 'if' instead of 'case'.

Signed-off-by: Gabriel Filion <lelutin@gmail.com>
2010-10-18 01:43:24 -04:00
Gabriel Filion
8175bff077 Add a proxy-client class
The module currently doesn't have a handy way of making a server get its
packages via a proxy. Add a "proxy-client" class that makes this easy.

$apt_proxy declares the proxy server's fqdn
$apt_proxy_port declares the port used for connection

Signed-off-by: Gabriel Filion <lelutin@gmail.com>
2010-10-17 20:42:09 -04:00
Gabriel Filion
ebcda455df Make $apt_clean effective in all cases
The file "/etc/apt/apt.conf.d/from_puppet" is currently only defined
when $custom_sources_list is not used (it is declared in
default_preferences).

Bring this file up in the apt class so that using custom sources doesn't
remove its addition.

Signed-off-by: Gabriel Filion <lelutin@gmail.com>
2010-10-17 20:36:45 -04:00
Gabriel Filion
296593bcbd Merge remote branch 'riseup/master'
Conflicts:
	manifests/init.pp
2010-10-17 20:35:35 -04:00
mh
e19c94dcd2 minor improvements, especially do not refresh apt every run 2010-10-17 15:18:08 +02:00
mh
b497ed88ef empty line between snippets 2010-10-17 14:40:27 +02:00
mh
68842b2f96 fix header file 2010-10-17 14:36:28 +02:00
mh
80ad2d086e fix classname 2010-10-17 14:29:01 +02:00
mh
b989192dfd fix modules directory stuff 2010-10-17 14:27:27 +02:00
mh
822d482f4d improve prefrences snippet 2010-10-17 14:13:02 +02:00
mh
4d28e6668f introduce preferences snippet
Now, we have the possibility to externally add snippes, so that
we can preferences for packages that are for example only in backports
or unstable.
2010-10-17 13:58:59 +02:00
nadir
eae01000c1 re-added apt::custom_sources_template to deploy custom sources.list.d/xyz.list 2010-10-09 14:39:11 +02:00
nadir
ed9263cd3d distribution specific sources.list.erb 2010-10-09 13:41:23 +02:00
nadir
9fa9bfd9d8 added possibility to have a custom 50unattended-upgrades 2010-10-09 13:39:39 +02:00
nadir
32d230c62c files in /etc/apt/apt.conf.d should be numbered 2010-10-09 13:36:30 +02:00
mh
521ccfec19 improve decision handling, remove unnecessary exec 2010-09-15 22:31:42 +02:00
Matt Taggart
356ff93340 backports.org has merged with the normal debian archive, the apt source changed and we don't need a separate apt-key for it now 2010-09-08 15:39:33 -07:00
Micah Anderson
cb9e265ad2 clean up the multiple File subscribes 2010-09-02 19:15:47 -04:00
Micah Anderson
92fd1d1351 quote all aliases to be consistent 2010-09-02 19:14:23 -04:00
mh
dd36612e50 refer to correct resource 2010-08-14 13:56:31 +02:00
mh
33f1b53c89 improve exec naming 2010-08-10 16:27:54 +02:00
mh
604cef0cc9 fix relation 2010-08-09 14:37:54 +02:00
mh
d1f120fd2d fix relation 2010-08-09 14:30:34 +02:00
mh
6aee66b509 remove unnecessary fileserver variable (#2460) 2010-08-07 02:12:12 +02:00
mh
bcb3ff88cd set loglevel to info so we don't pollute the logs 2010-06-28 21:49:09 +02:00
mh
a41c9ef86b adjust new module dir path 2010-05-09 22:44:40 +02:00
mh
f315dedce6 fix preseeding dir path 2009-11-14 14:35:09 +01:00
mh
64d2c07735 change pending module file resources to new 0.25 style 2009-11-02 01:12:12 +01:00
mh
ae4c5a6374 fix typo 2009-10-30 23:15:46 +01:00
mh
211ea52187 don't require anything 2009-10-30 23:07:12 +01:00
mh
848dff40a3 fixing requirements 2009-10-30 22:19:07 +01:00
mh
17be8ac184 switch to new lsb way 2009-10-30 22:04:48 +01:00
mh
61142025e7 our module_dir is currently called modules_dir 2009-10-30 21:43:43 +01:00
mh
0daa30f435 fix another typo 2009-10-30 21:15:21 +01:00
mh
1874479b3b fixing a string issue and tell it to install the package 2009-10-30 20:51:31 +01:00
mh
84f7ca7641 introduce a class to manage unattended-upgrades 2009-10-30 20:35:30 +01:00
mh
b0e0f720d0 add refactored files 2009-10-30 20:20:42 +01:00
mh
87d2fe06d1 refactor to fit pbp
- refactor every class and define into its very own file to fit
  better (at least our) puppet's best practices.

- some cosmetic rearrangements

- no code changes have been made, only reordering
2009-10-30 18:21:42 +01:00
Micah Anderson
28c7b3d5f4 Merge commit 'sarava/master' 2009-09-03 19:18:34 -04:00