summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Filion <gabster@lelutin.ca>2017-07-02 01:44:38 -0400
committerGabriel Filion <gabster@lelutin.ca>2017-07-02 01:44:38 -0400
commit14872fa632f4ae73b75464706e100967c9c9035f (patch)
tree0733caaf6142f13a863877fb91e52fc607464ade
parent5bbc86ff4f4a601a3924805a13fc1c5154670289 (diff)
Rename "stable" preferences file to "current_codename"
The file that we call "stable" can make apt actually pin testing or sid if one of these is the running codename, which is nothing stable. In order to make this file's name more relevant it should be named current_codename.
-rw-r--r--manifests/preferences.pp14
-rw-r--r--templates/Debian/current_codename.erb (renamed from templates/Debian/stable.erb)0
2 files changed, 10 insertions, 4 deletions
diff --git a/manifests/preferences.pp b/manifests/preferences.pp
index ce28d37..d2f6ab4 100644
--- a/manifests/preferences.pp
+++ b/manifests/preferences.pp
@@ -4,6 +4,12 @@ class apt::preferences {
ensure => absent;
}
+ # Remove the file that we were previously deploying. It's now been renamed to
+ # current_codename
+ file { '/etc/apt/preferences.d/stable':
+ ensure => absent,
+ }
+
if ($apt::manage_preferences == true) and ($apt::custom_preferences != undef) {
file {
@@ -14,7 +20,7 @@ class apt::preferences {
require => File['/etc/apt/sources.list'],
owner => root, group => 0, mode => '0644';
- '/etc/apt/preferences.d/stable':
+ '/etc/apt/preferences.d/current_codename':
ensure => absent;
'/etc/apt/preferences.d/volatile':
@@ -33,10 +39,10 @@ class apt::preferences {
if $::operatingsystem == "Debian" {
file {
- '/etc/apt/preferences.d/stable':
+ '/etc/apt/preferences.d/current_codename':
ensure => present,
alias => 'apt_config',
- content => template('apt/Debian/stable.erb'),
+ content => template('apt/Debian/current_codename.erb'),
require => File['/etc/apt/sources.list'],
owner => root, group => 0, mode => '0644';
@@ -94,7 +100,7 @@ class apt::preferences {
'/etc/apt/preferences.d/custom':
ensure => absent;
- '/etc/apt/preferences.d/stable':
+ '/etc/apt/preferences.d/current_codename':
ensure => absent;
'/etc/apt/preferences.d/volatile':
diff --git a/templates/Debian/stable.erb b/templates/Debian/current_codename.erb
index be05e51..be05e51 100644
--- a/templates/Debian/stable.erb
+++ b/templates/Debian/current_codename.erb