Commit graph

131 commits

Author SHA1 Message Date
mh
5d54dfdd88 unfortunately no comments are allowed in that file 2010-10-28 22:44:13 +02:00
mh
ebb46ca200 fixing comments
apt preferences actually want // to comment, while sources are fine
to be commented with # ...
2010-10-28 22:27:28 +02:00
mh
4cff5ef63e Revert "remove comments as lenny apt doesn't like them"
This reverts commit 5de6431b89.

Actually the comments are just the wrong way...
2010-10-28 22:25:06 +02:00
mh
5de6431b89 remove comments as lenny apt doesn't like them
I got errors like:

E: Syntax error /etc/apt/apt.conf.d/03clean:4: Extra junk after value

Removing these comments fixed these problems.
2010-10-28 22:18:30 +02:00
mh
90c45cfe44 put the file at the right place & fix typos 2010-10-28 22:05:37 +02:00
Gabriel Filion
b5c504e19e Correct some errors in the README
Signed-off-by: Gabriel Filion <lelutin@gmail.com>
2010-10-25 14:36:19 -04:00
Gabriel Filion
bd3b46ac07 Change "brought to you" into "managed" in headers
File headers are there to indicate that the files should not be touched
directly on the server. By changing the first sentence to "This file is
managed by Puppet", we reinforce the idea that it is already taken care
of by something else.

Signed-off-by: Gabriel Filion <lelutin@gmail.com>
2010-10-25 14:19:58 -04:00
Gabriel Filion
8efc70cab8 Update the README
Include new classes and defines and move things around for a little bit
of consistency.
Also remove the now unused variables.

Signed-off-by: Gabriel Filion <lelutin@gmail.com>
2010-10-25 14:19:58 -04:00
Gabriel Filion
92aa5a51e9 Ensure presence of sources.list.d and watch it
Add a file resource on the apt/sources.list.d directory to ensure that
it is created as a directory and watch it for modifications to
automatically refresh the apt cache.

Signed-off-by: Gabriel Filion <lelutin@gmail.com>
2010-10-25 14:15:52 -04:00
Gabriel Filion
aaf3bd6adb Remove $apt_unattended_upgrades
Unattended upgrades are not always necessary. Including the
apt::unattended_upgrades class through the main apt class is not
appropriate. It is better to make nodes include the
apt::unattended_upgrades class explicitly.

Remove the $apt_unattended_upgrades variable along with the include in
the 'apt' class.

Signed-off-by: Gabriel Filion <lelutin@gmail.com>
2010-10-25 14:15:52 -04:00
Gabriel Filion
4ebb7d463e Fix apt::preferences::absent
Currently, setting the $custom_preferences variable to false fails
because of the /etc/apt/preferences concatenated_file being re-defined.

Fix this by setting dependencies on the resource only when we expect to
create the /etc/apt/preferences file. Also, since there is no "ensure"
parameter to concatenated_file, use a simple file resource to ensure
that it is removed.

Signed-off-by: Gabriel Filion <lelutin@gmail.com>
2010-10-25 14:15:12 -04:00
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
1b0bc41597 Add file headers for awareness of puppet presence
Signed-off-by: Gabriel Filion <lelutin@gmail.com>
2010-10-25 01:13:44 -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
9d1a018eed improve example 2010-10-17 14:43:06 +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
db06babc5d removed backports template in favor of main sources.list 2010-10-09 13:42:26 +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
nadir
49f17e56eb merge with immerda master 2010-10-09 11:49:05 +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
Micah Anderson
a5e4ab40d8 Merge remote branch 'immerda/master'
Conflicts:
	manifests/init.pp
2010-09-02 19:12:58 -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