From 16fa78a4fdc21fc1ce8bb4bcb1788c8007e7c373 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis-Philippe=20V=C3=A9ronneau?= Date: Fri, 24 Feb 2017 15:18:02 -0500 Subject: move from monolithic preferences file to multiple preferences.d files --- manifests/preferences.pp | 63 ++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 50 insertions(+), 13 deletions(-) diff --git a/manifests/preferences.pp b/manifests/preferences.pp index d3eb780..787f46f 100644 --- a/manifests/preferences.pp +++ b/manifests/preferences.pp @@ -1,19 +1,56 @@ class apt::preferences { - $pref_contents = $apt::custom_preferences ? { - '' => $::operatingsystem ? { - 'debian' => template("apt/${::operatingsystem}/preferences.erb"), - 'ubuntu' => template("apt/${::operatingsystem}/preferences_${apt::codename}.erb"), - }, - default => $apt::custom_preferences + if $::operatingsystem == "Debian" { + + file { '/etc/apt/preferences.d/stable': + ensure => present, + alias => 'apt_config', + # only update together + content => template('apt/Debian/stable.erb'), + require => File['/etc/apt/sources.list'], + owner => root, group => 0, mode => '0644'; + } + + if $apt::use_volatile { + + file { '/etc/apt/preferences.d/volatile': + ensure => present, + content => template('apt/Debian/volatile.erb'), + require => File['/etc/apt/sources.list'], + owner => root, group => 0, mode => '0644'; + } + } + + if $apt::use_lts { + + file { '/etc/apt/preferences.d/lts': + ensure => present, + content => template('apt/Debian/lts.erb'), + require => File['/etc/apt/sources.list'], + owner => root, group => 0, mode => '0644'; + } + } + + if ($::debian_nextcodename) and ($::debian_nextcodename != "experimental") { + + file { '/etc/apt/preferences.d/nextcodename': + ensure => present, + content => template('apt/Debian/nextcodename.erb'), + require => File['/etc/apt/sources.list'], + owner => root, group => 0, mode => '0644'; + } + } } - file { '/etc/apt/preferences': - ensure => present, - alias => 'apt_config', - # only update together - content => $pref_contents, - require => File['/etc/apt/sources.list'], - owner => root, group => 0, mode => '0644'; + elsif $::operatingsystem == "Ubuntu" { + + file { '/etc/apt/preferences': + ensure => present, + alias => 'apt_config', + # only update together + content => template("apt/Ubuntu/preferences_${apt::codename}.erb"), + require => File['/etc/apt/sources.list'], + owner => root, group => 0, mode => '0644'; + } } } -- cgit v1.2.3 From 7efd1bdbf731d1593e70be5105fd9d178bad54f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis-Philippe=20V=C3=A9ronneau?= Date: Fri, 24 Feb 2017 15:19:40 -0500 Subject: add new preferences.d templates --- templates/Debian/fallback.erb | 7 +++++++ templates/Debian/lts.erb | 7 +++++++ templates/Debian/nextcodename.erb | 7 +++++++ templates/Debian/stable.erb | 7 +++++++ templates/Debian/volatile.erb | 7 +++++++ 5 files changed, 35 insertions(+) create mode 100644 templates/Debian/fallback.erb create mode 100644 templates/Debian/lts.erb create mode 100644 templates/Debian/nextcodename.erb create mode 100644 templates/Debian/stable.erb create mode 100644 templates/Debian/volatile.erb diff --git a/templates/Debian/fallback.erb b/templates/Debian/fallback.erb new file mode 100644 index 0000000..1c75e83 --- /dev/null +++ b/templates/Debian/fallback.erb @@ -0,0 +1,7 @@ +# This file is managed by puppet +# all local modifications will be overwritten + +Explanation: Debian fallback +Package: * +Pin: release o=Debian +Pin-Priority: -10 diff --git a/templates/Debian/lts.erb b/templates/Debian/lts.erb new file mode 100644 index 0000000..74281b6 --- /dev/null +++ b/templates/Debian/lts.erb @@ -0,0 +1,7 @@ +# This file is managed by puppet +# all local modifications will be overwritten + +Explanation: Debian <%= codename %>-lts +Package: * +Pin: release o=Debian,n=<%= codename %>-lts +Pin-Priority: 990 diff --git a/templates/Debian/nextcodename.erb b/templates/Debian/nextcodename.erb new file mode 100644 index 0000000..d4f9a40 --- /dev/null +++ b/templates/Debian/nextcodename.erb @@ -0,0 +1,7 @@ +# This file is managed by puppet +# all local modifications will be overwritten + +Explanation: Debian <%= next_codename %> +Package: * +Pin: release o=Debian,n=<%= next_codename %> +Pin-Priority: 2 diff --git a/templates/Debian/stable.erb b/templates/Debian/stable.erb new file mode 100644 index 0000000..df84fce --- /dev/null +++ b/templates/Debian/stable.erb @@ -0,0 +1,7 @@ +# This file is managed by puppet +# all local modifications will be overwritten + +Explanation: Debian <%= codename=scope.lookupvar('::debian_codename') %> +Package: * +Pin: release o=Debian,n=<%= codename %> +Pin-Priority: 990 diff --git a/templates/Debian/volatile.erb b/templates/Debian/volatile.erb new file mode 100644 index 0000000..1654abe --- /dev/null +++ b/templates/Debian/volatile.erb @@ -0,0 +1,7 @@ +# This file is managed by puppet +# all local modifications will be overwritten + +Explanation: Debian <%= codename %>-updates +Package: * +Pin: release o=Debian,n=<%= codename %>-updates +Pin-Priority: 990 -- cgit v1.2.3 From 0c189c8bdbbcc46a42f10ddd700d790f40834661 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis-Philippe=20V=C3=A9ronneau?= Date: Fri, 24 Feb 2017 15:30:26 -0500 Subject: fix variable name --- templates/Debian/nextcodename.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/Debian/nextcodename.erb b/templates/Debian/nextcodename.erb index d4f9a40..0810412 100644 --- a/templates/Debian/nextcodename.erb +++ b/templates/Debian/nextcodename.erb @@ -1,7 +1,7 @@ # This file is managed by puppet # all local modifications will be overwritten -Explanation: Debian <%= next_codename %> +Explanation: Debian <%= debian_nextcodename %> Package: * -Pin: release o=Debian,n=<%= next_codename %> +Pin: release o=Debian,n=<%= debian_nextcodename %> Pin-Priority: 2 -- cgit v1.2.3 From 5e9099b77546a77492402b4003bc9e002bcc4650 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis-Philippe=20V=C3=A9ronneau?= Date: Fri, 24 Feb 2017 15:32:15 -0500 Subject: preferences.d/stable is the new preferences --- manifests/config.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/manifests/config.pp b/manifests/config.pp index 542fc1f..f50d4bc 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -3,7 +3,7 @@ class apt::config { exec { 'update_apt': command => '/usr/bin/apt-get update', require => [ File['/etc/apt/apt.conf.d', - '/etc/apt/preferences', + '/etc/apt/preferences.d/stable', '/etc/apt/sources.list'] ], refreshonly => true; } -- cgit v1.2.3 From f447904e47c14f287283d8a3de9fb17033ccafdb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis-Philippe=20V=C3=A9ronneau?= Date: Fri, 24 Feb 2017 15:44:21 -0500 Subject: fix variable name (bis) --- templates/Debian/lts.erb | 4 ++-- templates/Debian/stable.erb | 4 ++-- templates/Debian/volatile.erb | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/templates/Debian/lts.erb b/templates/Debian/lts.erb index 74281b6..3ed2f51 100644 --- a/templates/Debian/lts.erb +++ b/templates/Debian/lts.erb @@ -1,7 +1,7 @@ # This file is managed by puppet # all local modifications will be overwritten -Explanation: Debian <%= codename %>-lts +Explanation: Debian <%= debian_codename %>-lts Package: * -Pin: release o=Debian,n=<%= codename %>-lts +Pin: release o=Debian,n=<%= debian_codename %>-lts Pin-Priority: 990 diff --git a/templates/Debian/stable.erb b/templates/Debian/stable.erb index df84fce..0acfc8f 100644 --- a/templates/Debian/stable.erb +++ b/templates/Debian/stable.erb @@ -1,7 +1,7 @@ # This file is managed by puppet # all local modifications will be overwritten -Explanation: Debian <%= codename=scope.lookupvar('::debian_codename') %> +Explanation: Debian <%= debian_codename %> Package: * -Pin: release o=Debian,n=<%= codename %> +Pin: release o=Debian,n=<%= debian_codename %> Pin-Priority: 990 diff --git a/templates/Debian/volatile.erb b/templates/Debian/volatile.erb index 1654abe..5014e01 100644 --- a/templates/Debian/volatile.erb +++ b/templates/Debian/volatile.erb @@ -1,7 +1,7 @@ # This file is managed by puppet # all local modifications will be overwritten -Explanation: Debian <%= codename %>-updates +Explanation: Debian <%= debian_codename %>-updates Package: * -Pin: release o=Debian,n=<%= codename %>-updates +Pin: release o=Debian,n=<%= debian_codename %>-updates Pin-Priority: 990 -- cgit v1.2.3 From 3f0a363088c64c905a3fe7f6369d28b770cdf481 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis-Philippe=20V=C3=A9ronneau?= Date: Fri, 24 Feb 2017 16:30:49 -0500 Subject: fix custom_preferences && refactor how they work --- manifests/init.pp | 9 +--- manifests/params.pp | 23 +++++----- manifests/preferences.pp | 93 ++++++++++++++++++++++++++-------------- manifests/preferences/absent.pp | 7 --- manifests/preferences_snippet.pp | 3 -- 5 files changed, 73 insertions(+), 62 deletions(-) delete mode 100644 manifests/preferences/absent.pp diff --git a/manifests/init.pp b/manifests/init.pp index 26afaeb..3a37f6b 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -23,17 +23,10 @@ class apt ( include apt::dot_d_directories include apt::config include apt::install + include apt::preferences include common::moduledir common::module_dir { 'apt': } $apt_base_dir = "${common::moduledir::module_dir_path}/apt" - case $custom_preferences { - false: { - include apt::preferences::absent - } - default: { - include apt::preferences - } - } } diff --git a/manifests/params.pp b/manifests/params.pp index 463cd63..3879c81 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -1,14 +1,16 @@ class apt::params () { - $use_lts = false - $use_volatile = false - $use_backports = true - $include_src = false - $use_next_release = false - $debian_url = 'http://httpredir.debian.org/debian/' - $security_url = 'http://security.debian.org/' - $ubuntu_url = 'http://archive.ubuntu.com/ubuntu' - $lts_url = $debian_url - $volatile_url = 'http://volatile.debian.org/debian-volatile/' + $use_lts = false + $use_volatile = false + $use_backports = true + $include_src = false + $use_next_release = false + $manage_preferences = true + $custom_preferences = undef + $debian_url = 'http://httpredir.debian.org/debian/' + $security_url = 'http://security.debian.org/' + $ubuntu_url = 'http://archive.ubuntu.com/ubuntu' + $lts_url = $debian_url + $volatile_url = 'http://volatile.debian.org/debian-volatile/' case $::operatingsystem { 'debian': { $repos = 'main contrib non-free' @@ -20,6 +22,5 @@ class apt::params () { fail("Unsupported system '${::operatingsystem}'.") } } - $custom_preferences = '' $custom_key_dir = false } diff --git a/manifests/preferences.pp b/manifests/preferences.pp index 787f46f..548098f 100644 --- a/manifests/preferences.pp +++ b/manifests/preferences.pp @@ -1,56 +1,83 @@ class apt::preferences { - if $::operatingsystem == "Debian" { - - file { '/etc/apt/preferences.d/stable': - ensure => present, - alias => 'apt_config', - # only update together - content => template('apt/Debian/stable.erb'), - require => File['/etc/apt/sources.list'], - owner => root, group => 0, mode => '0644'; + if ($apt::manage_preferences == true) and ($apt::custom_preferences != undef) { + + file { '/etc/apt/preferences.d/custom': + ensure => present, + alias => 'apt_config', + # only update together + content => $custom_preferences, + require => File['/etc/apt/sources.list'], + owner => root, group => 0, mode => '0644'; } + } - if $apt::use_volatile { + elsif $apt::manage_preferences == true { - file { '/etc/apt/preferences.d/volatile': + if $::operatingsystem == "Debian" { + + file { '/etc/apt/preferences.d/stable': ensure => present, - content => template('apt/Debian/volatile.erb'), + alias => 'apt_config', + # only update together + content => template('apt/Debian/stable.erb'), require => File['/etc/apt/sources.list'], owner => root, group => 0, mode => '0644'; } - } - if $apt::use_lts { + if $apt::use_volatile { - file { '/etc/apt/preferences.d/lts': - ensure => present, - content => template('apt/Debian/lts.erb'), - require => File['/etc/apt/sources.list'], - owner => root, group => 0, mode => '0644'; + file { '/etc/apt/preferences.d/volatile': + ensure => present, + content => template('apt/Debian/volatile.erb'), + require => File['/etc/apt/sources.list'], + owner => root, group => 0, mode => '0644'; + } + } + + if $apt::use_lts { + + file { '/etc/apt/preferences.d/lts': + ensure => present, + content => template('apt/Debian/lts.erb'), + require => File['/etc/apt/sources.list'], + owner => root, group => 0, mode => '0644'; + } + } + + if ($::debian_nextcodename) and ($::debian_nextcodename != "experimental") { + + file { '/etc/apt/preferences.d/nextcodename': + ensure => present, + content => template('apt/Debian/nextcodename.erb'), + require => File['/etc/apt/sources.list'], + owner => root, group => 0, mode => '0644'; + } } } - if ($::debian_nextcodename) and ($::debian_nextcodename != "experimental") { + elsif $::operatingsystem == "Ubuntu" { - file { '/etc/apt/preferences.d/nextcodename': - ensure => present, - content => template('apt/Debian/nextcodename.erb'), - require => File['/etc/apt/sources.list'], - owner => root, group => 0, mode => '0644'; + file { '/etc/apt/preferences': + ensure => present, + alias => 'apt_config', + # only update together + content => template("apt/Ubuntu/preferences_${apt::codename}.erb"), + require => File['/etc/apt/sources.list'], + owner => root, group => 0, mode => '0644'; } } } - elsif $::operatingsystem == "Ubuntu" { + elsif $apt::manage_preferences == false { - file { '/etc/apt/preferences': - ensure => present, - alias => 'apt_config', - # only update together - content => template("apt/Ubuntu/preferences_${apt::codename}.erb"), - require => File['/etc/apt/sources.list'], - owner => root, group => 0, mode => '0644'; + file { + [ '/etc/apt/preferences.d/custom', + '/etc/apt/preferences.d/stable', + '/etc/apt/preferences.d/volatile', + '/etc/apt/preferences.d/lts', + '/etc/apt/preferences.d/nextcodename']: + ensure => absent; } } } diff --git a/manifests/preferences/absent.pp b/manifests/preferences/absent.pp deleted file mode 100644 index f32e030..0000000 --- a/manifests/preferences/absent.pp +++ /dev/null @@ -1,7 +0,0 @@ -class apt::preferences::absent { - - file { '/etc/apt/preferences': - ensure => absent, - alias => 'apt_config', - } -} diff --git a/manifests/preferences_snippet.pp b/manifests/preferences_snippet.pp index 8905318..04fb010 100644 --- a/manifests/preferences_snippet.pp +++ b/manifests/preferences_snippet.pp @@ -13,9 +13,6 @@ define apt::preferences_snippet ( } if $ensure == 'present' { - if $apt::custom_preferences == false { - fail('Trying to define a preferences_snippet with $custom_preferences set to false.') - } if $priority == undef { fail("apt::preferences_snippet requires the 'priority' argument to be set") -- cgit v1.2.3 From e6b07002d6b53b45012d93a33296b7b7e32f8e92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis-Philippe=20V=C3=A9ronneau?= Date: Fri, 24 Feb 2017 17:08:12 -0500 Subject: remove preferences.d files when not using them --- manifests/config.pp | 1 - manifests/preferences.pp | 37 +++++++++++++++++++++++-------------- 2 files changed, 23 insertions(+), 15 deletions(-) diff --git a/manifests/config.pp b/manifests/config.pp index f50d4bc..50a8ebd 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -3,7 +3,6 @@ class apt::config { exec { 'update_apt': command => '/usr/bin/apt-get update', require => [ File['/etc/apt/apt.conf.d', - '/etc/apt/preferences.d/stable', '/etc/apt/sources.list'] ], refreshonly => true; } diff --git a/manifests/preferences.pp b/manifests/preferences.pp index 548098f..a1e78ee 100644 --- a/manifests/preferences.pp +++ b/manifests/preferences.pp @@ -2,13 +2,19 @@ class apt::preferences { if ($apt::manage_preferences == true) and ($apt::custom_preferences != undef) { - file { '/etc/apt/preferences.d/custom': - ensure => present, - alias => 'apt_config', - # only update together - content => $custom_preferences, - require => File['/etc/apt/sources.list'], - owner => root, group => 0, mode => '0644'; + file { + '/etc/apt/preferences.d/custom': + ensure => present, + alias => 'apt_config', + content => template(${apt::custom_preferences}), + require => File['/etc/apt/sources.list'], + owner => root, group => 0, mode => '0644'; + + [ '/etc/apt/preferences.d/stable', + '/etc/apt/preferences.d/volatile', + '/etc/apt/preferences.d/lts', + '/etc/apt/preferences.d/nextcodename' ]: + ensure => absent; } } @@ -16,13 +22,16 @@ class apt::preferences { if $::operatingsystem == "Debian" { - file { '/etc/apt/preferences.d/stable': - ensure => present, - alias => 'apt_config', - # only update together - content => template('apt/Debian/stable.erb'), - require => File['/etc/apt/sources.list'], - owner => root, group => 0, mode => '0644'; + file { + '/etc/apt/preferences.d/stable': + ensure => present, + alias => 'apt_config', + content => template('apt/Debian/stable.erb'), + require => File['/etc/apt/sources.list'], + owner => root, group => 0, mode => '0644'; + + '/etc/apt/preferences.d/custom': + ensure => absent; } if $apt::use_volatile { -- cgit v1.2.3 From 9e47b77a2ba0145103da82921b36de4facf59a84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis-Philippe=20V=C3=A9ronneau?= Date: Fri, 24 Feb 2017 17:28:41 -0500 Subject: add manage_preferences to init.pp --- manifests/init.pp | 1 + 1 file changed, 1 insertion(+) diff --git a/manifests/init.pp b/manifests/init.pp index 3a37f6b..25e35ff 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -15,6 +15,7 @@ class apt ( $volatile_url = $apt::params::volatile_url, $ubuntu_url = $apt::params::ubuntu_url, $repos = $apt::params::repos, + $manage_preferences = $apt::params::manage_preferences, $custom_preferences = $apt::params::custom_preferences, $custom_sources_list = '', $custom_key_dir = $apt::params::custom_key_dir, -- cgit v1.2.3 From ef250c00dc9217bca231890899febe27c60b7d92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis-Philippe=20V=C3=A9ronneau?= Date: Fri, 24 Feb 2017 17:30:46 -0500 Subject: seems puppet didn't like square brackets --- manifests/preferences.pp | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/manifests/preferences.pp b/manifests/preferences.pp index a1e78ee..455b9ab 100644 --- a/manifests/preferences.pp +++ b/manifests/preferences.pp @@ -6,15 +6,21 @@ class apt::preferences { '/etc/apt/preferences.d/custom': ensure => present, alias => 'apt_config', - content => template(${apt::custom_preferences}), + content => template($apt::custom_preferences), require => File['/etc/apt/sources.list'], owner => root, group => 0, mode => '0644'; - [ '/etc/apt/preferences.d/stable', - '/etc/apt/preferences.d/volatile', - '/etc/apt/preferences.d/lts', - '/etc/apt/preferences.d/nextcodename' ]: - ensure => absent; + '/etc/apt/preferences.d/stable': + ensure => absent; + + '/etc/apt/preferences.d/volatile': + ensure => absent; + + '/etc/apt/preferences.d/lts': + ensure => absent; + + '/etc/apt/preferences.d/nextcodename': + ensure => absent; } } @@ -81,12 +87,20 @@ class apt::preferences { elsif $apt::manage_preferences == false { file { - [ '/etc/apt/preferences.d/custom', - '/etc/apt/preferences.d/stable', - '/etc/apt/preferences.d/volatile', - '/etc/apt/preferences.d/lts', - '/etc/apt/preferences.d/nextcodename']: - ensure => absent; + '/etc/apt/preferences.d/custom': + ensure => absent; + + '/etc/apt/preferences.d/stable': + ensure => absent; + + '/etc/apt/preferences.d/volatile': + ensure => absent; + + '/etc/apt/preferences.d/lts': + ensure => absent; + + '/etc/apt/preferences.d/nextcodename': + ensure => absent; } } } -- cgit v1.2.3 From b34581d9c74cb02eec11278f0b5d028495c005e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis-Philippe=20V=C3=A9ronneau?= Date: Fri, 24 Feb 2017 17:38:51 -0500 Subject: ensure old monolithic preferences file is no more --- manifests/preferences.pp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/manifests/preferences.pp b/manifests/preferences.pp index 455b9ab..ce28d37 100644 --- a/manifests/preferences.pp +++ b/manifests/preferences.pp @@ -1,5 +1,9 @@ class apt::preferences { + file { '/etc/apt/preferences': + ensure => absent; + } + if ($apt::manage_preferences == true) and ($apt::custom_preferences != undef) { file { -- cgit v1.2.3 From 416103f0625d67cb4056fe1d92775d1685966799 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis-Philippe=20V=C3=A9ronneau?= Date: Fri, 24 Feb 2017 17:49:27 -0500 Subject: update the README with the new preferences.d behavior --- README.md | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 4aa2cc0..32c86db 100644 --- a/README.md +++ b/README.md @@ -253,25 +253,19 @@ Example usage: If this variable is set the default repositories list ("main contrib non-free") is overriden. -### custom_preferences +### manage_preferences - For historical reasons (Debian Lenny's version of APT did not support the use - of the `preferences.d` directory for putting fragments of 'preferences'), this - module will manage a default generic apt/preferences file with more - recent releases pinned to very low values so that any package - installation will not accidentally pull in packages from those suites - unless you explicitly specify the version number. This file will be - complemented with all of the preferences_snippet calls (see below). + Setting this variable to `false` will delete all the files in `preferences.d` + managed by Puppet. By default, this parameter is set to `true`. - If the default preferences template doesn't suit your needs, you can create a - template located in your `site_apt` module, and set custom_preferences with the - content (eg. custom_preferences => template('site_apt/preferences') ) +### custom_preferences - Setting this variable to false before including this class will force the - `apt/preferences` file to be absent: + If the default preferences template doesn't suit your needs, you can create a + template located in your `apt` module, and set `custom_preferences` to your + preferred template: class { 'apt': - custom_preferences => false, + custom_preferences => 'apt/my_super_template.erb', } ### custom_sources_list -- cgit v1.2.3 From 4a261733172f2699b217ea6d43ec9ee09a32c72d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis-Philippe=20V=C3=A9ronneau?= Date: Fri, 24 Feb 2017 18:17:34 -0500 Subject: define variables in templates with the right style --- templates/Debian/lts.erb | 4 ++-- templates/Debian/nextcodename.erb | 4 ++-- templates/Debian/stable.erb | 4 ++-- templates/Debian/volatile.erb | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/templates/Debian/lts.erb b/templates/Debian/lts.erb index 3ed2f51..a77835e 100644 --- a/templates/Debian/lts.erb +++ b/templates/Debian/lts.erb @@ -1,7 +1,7 @@ # This file is managed by puppet # all local modifications will be overwritten -Explanation: Debian <%= debian_codename %>-lts +Explanation: Debian <%= @debian_codename %>-lts Package: * -Pin: release o=Debian,n=<%= debian_codename %>-lts +Pin: release o=Debian,n=<%= @debian_codename %>-lts Pin-Priority: 990 diff --git a/templates/Debian/nextcodename.erb b/templates/Debian/nextcodename.erb index 0810412..2bec9ad 100644 --- a/templates/Debian/nextcodename.erb +++ b/templates/Debian/nextcodename.erb @@ -1,7 +1,7 @@ # This file is managed by puppet # all local modifications will be overwritten -Explanation: Debian <%= debian_nextcodename %> +Explanation: Debian <%= @debian_nextcodename %> Package: * -Pin: release o=Debian,n=<%= debian_nextcodename %> +Pin: release o=Debian,n=<%= @debian_nextcodename %> Pin-Priority: 2 diff --git a/templates/Debian/stable.erb b/templates/Debian/stable.erb index 0acfc8f..be05e51 100644 --- a/templates/Debian/stable.erb +++ b/templates/Debian/stable.erb @@ -1,7 +1,7 @@ # This file is managed by puppet # all local modifications will be overwritten -Explanation: Debian <%= debian_codename %> +Explanation: Debian <%= @debian_codename %> Package: * -Pin: release o=Debian,n=<%= debian_codename %> +Pin: release o=Debian,n=<%= @debian_codename %> Pin-Priority: 990 diff --git a/templates/Debian/volatile.erb b/templates/Debian/volatile.erb index 5014e01..47ec2d8 100644 --- a/templates/Debian/volatile.erb +++ b/templates/Debian/volatile.erb @@ -1,7 +1,7 @@ # This file is managed by puppet # all local modifications will be overwritten -Explanation: Debian <%= debian_codename %>-updates +Explanation: Debian <%= @debian_codename %>-updates Package: * -Pin: release o=Debian,n=<%= debian_codename %>-updates +Pin: release o=Debian,n=<%= @debian_codename %>-updates Pin-Priority: 990 -- cgit v1.2.3