Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
base
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Lonlone Lee
base
Commits
3aef7387
Commit
3aef7387
authored
Apr 21, 2016
by
Adam Lewenberg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
first attempt at apt cache file override
parent
92f08cda
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
2 deletions
+45
-2
manifests/os/debian.pp
manifests/os/debian.pp
+44
-2
templates/os/etc/apt/preferences.d/apt_cache_tmp.erb
templates/os/etc/apt/preferences.d/apt_cache_tmp.erb
+1
-0
No files found.
manifests/os/debian.pp
View file @
3aef7387
...
...
@@ -7,7 +7,33 @@
# We install filter-syslog rules, so make sure that newsyslog is always
# installed.
class
base::os::debian
{
#
# PARAMETERS
# ----------
#
# $apt_cache_notin_tmp: If you want apt to use a directory other than
# /tmp for its temporary cache, set this parameter to "true". This is needed
# if the /tmp partition is set to "noexec" (apt often needs to execture
# configuration files as part of an install or uninstall).
#
# If $apt_cache_notin_tmp is set to "true" and $apt_cache_directory is
# undefined, then apt will use /var/cache/apt/tmp for its temporary
# directory. If you want to specify a different directory, set
# the $apt_cache_tmp_dir.
#
# $apt_cache_tmp_dir: if $apt_cache_notin_tmp is set to "false" this
# parameter is ignored. If $apt_cache_notin_tmp is set to "true" then we
# configure apt to use $apt_cache_tmp_dir as apt's temporary directory
# during package installs and uninstalls.
#
# NOTE! If you use $apt_cache_tmp_dir to override the default, then you
# must have $apt_cache_tmp_dir as a file resource in your own Puppet
# code, otherwise Puppet will fail.
class
base::os::debian
(
$apt_cache_notin_tmp
=
false
,
$apt_cache_tmp_dir
=
'/var/cache/apt/tmp'
){
include
base::newsyslog
# This really needs to be put somewhere else so that all possible uses of
...
...
@@ -76,6 +102,22 @@ class base::os::debian {
content
=>
template
(
'base/os/preferences/backports.erb'
);
}
if
(
$apt_cache_notin_tmp
)
{
# If we did NOT override the apt cache directory make sure that
# '/var/cache/apt/tmp' exists.
if
(
$apt_cache_tmp_dir
==
'/var/cache/apt/tmp'
)
{
file
{
$apt_cache_tmp_dir
:
ensure
=>
directory
,
require
=>
Package
[
'apt'
],
}
}
file
{
'/etc/apt/preferences.d/apt_cache_tmp'
:
content
=>
template
(
'base/os/etc/apt/preferences.d/apt_cache_tmp.erb'
),
require
=>
File
[
$apt_cache_tmp_dir
],
}
}
# lsb-release pulls in all of lsb unless we disable recommends handling
# first, so make sure that we've done that. That should be handled by the
# global Package require set above.
...
...
@@ -119,7 +161,7 @@ class base::os::debian {
'wheezy'
:
{
package
{
'emacs23-nox'
:
ensure
=>
present
}
}
'jessie'
:
{
package
{
'emacs24-nox'
:
ensure
=>
present
}
}
}
# Ensure this file exists, containing only a comment.
file
{
'/etc/default/locale'
:
ensure
=>
present
,
...
...
templates/os/etc/apt/preferences.d/apt_cache_tmp.erb
0 → 100644
View file @
3aef7387
APT::ExtractTemplates::TempDir "
<%=
@apt_cache_tmp_dir
%>
";
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment