From 2ecc85819566ed2ce6d6894a71fff32b416d8fb9 Mon Sep 17 00:00:00 2001 From: Tech SOGEECOM Date: Thu, 22 Sep 2016 15:13:47 -0400 Subject: fix issue #15 --- manifests/reboot_required_notify/jessie.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests') diff --git a/manifests/reboot_required_notify/jessie.pp b/manifests/reboot_required_notify/jessie.pp index 2de6b62..6aac2b7 100644 --- a/manifests/reboot_required_notify/jessie.pp +++ b/manifests/reboot_required_notify/jessie.pp @@ -1,4 +1,4 @@ -class apt::reboot_required_notify::jessie ($ensure = present) { +class apt::reboot_required_notify::jessie ($ensure = present) inherits apt{ if $::operatingsystemmajrelease == 8 and ! $::apt::use_backports { fail('apt::reboot_required_notify requires $apt::use_backports on Jessie') -- cgit v1.2.3 From e57b37aa884713b6ff6273235ca002ae438cfb4f Mon Sep 17 00:00:00 2001 From: Tech SOGEECOM Date: Thu, 22 Sep 2016 15:56:02 -0400 Subject: fix missing whitespace --- manifests/reboot_required_notify/jessie.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'manifests') diff --git a/manifests/reboot_required_notify/jessie.pp b/manifests/reboot_required_notify/jessie.pp index 6aac2b7..0dd6a18 100644 --- a/manifests/reboot_required_notify/jessie.pp +++ b/manifests/reboot_required_notify/jessie.pp @@ -1,4 +1,4 @@ -class apt::reboot_required_notify::jessie ($ensure = present) inherits apt{ +class apt::reboot_required_notify::jessie ($ensure = present) inherits apt { if $::operatingsystemmajrelease == 8 and ! $::apt::use_backports { fail('apt::reboot_required_notify requires $apt::use_backports on Jessie') -- cgit v1.2.3 From 0b9e32d9ce49a3a74be559b0b487e0beba1c3298 Mon Sep 17 00:00:00 2001 From: varac Date: Thu, 3 Nov 2016 00:09:25 +0100 Subject: Scope defines of apt_conf --- manifests/init.pp | 6 +++--- manifests/proxy_client.pp | 2 +- manifests/unattended_upgrades.pp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'manifests') diff --git a/manifests/init.pp b/manifests/init.pp index 4bf126c..3d93d22 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -40,14 +40,14 @@ class apt( mode => '0644'; } - apt_conf { '02show_upgraded': + ::apt::apt_conf { '02show_upgraded': source => [ "puppet:///modules/site_apt/${::fqdn}/02show_upgraded", 'puppet:///modules/site_apt/02show_upgraded', 'puppet:///modules/apt/02show_upgraded' ] } if ( $::virtual == 'vserver' ) { - apt_conf { '03clean_vserver': + ::apt::apt_conf { '03clean_vserver': source => [ "puppet:///modules/site_apt/${::fqdn}/03clean_vserver", 'puppet:///modules/site_apt/03clean_vserver', 'puppet:///modules/apt/03clean_vserver' ], @@ -55,7 +55,7 @@ class apt( } } else { - apt_conf { '03clean': + ::apt::apt_conf { '03clean': source => [ "puppet:///modules/site_apt/${::fqdn}/03clean", 'puppet:///modules/site_apt/03clean', 'puppet:///modules/apt/03clean' ] diff --git a/manifests/proxy_client.pp b/manifests/proxy_client.pp index 9ba79f2..e7972f7 100644 --- a/manifests/proxy_client.pp +++ b/manifests/proxy_client.pp @@ -3,7 +3,7 @@ class apt::proxy_client( $port = '3142', ){ - apt_conf { '20proxy': + ::apt::apt_conf { '20proxy': content => template('apt/20proxy.erb'), } } diff --git a/manifests/unattended_upgrades.pp b/manifests/unattended_upgrades.pp index 52d7542..d604125 100644 --- a/manifests/unattended_upgrades.pp +++ b/manifests/unattended_upgrades.pp @@ -26,7 +26,7 @@ class apt::unattended_upgrades ( default => $config_content } - apt_conf { '50unattended-upgrades': + ::apt::apt_conf { '50unattended-upgrades': content => $file_content, require => Package['unattended-upgrades'], refresh_apt => false -- cgit v1.2.3 From ee49b28eeac4f0e7e746aafc6a000adfa89b3687 Mon Sep 17 00:00:00 2001 From: varac Date: Thu, 3 Nov 2016 00:45:34 +0100 Subject: Use undef as default for source parameter --- manifests/apt_conf.pp | 6 +++--- manifests/sources_list.pp | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'manifests') diff --git a/manifests/apt_conf.pp b/manifests/apt_conf.pp index 949f615..fa8cfa3 100644 --- a/manifests/apt_conf.pp +++ b/manifests/apt_conf.pp @@ -1,15 +1,15 @@ define apt::apt_conf( $ensure = 'present', - $source = '', + $source = undef, $content = undef, $refresh_apt = true ) { - if $source == '' and $content == undef { + if $source == undef and $content == undef { fail("One of \$source or \$content must be specified for apt_conf ${name}") } - if $source != '' and $content != undef { + if $source != undef and $content != undef { fail("Only one of \$source or \$content must specified for apt_conf ${name}") } diff --git a/manifests/sources_list.pp b/manifests/sources_list.pp index 7565bce..6ff4fc3 100644 --- a/manifests/sources_list.pp +++ b/manifests/sources_list.pp @@ -1,15 +1,15 @@ # Configure an apt source define apt::sources_list ( - $ensure = 'present', - $source = '', + $ensure = 'present', + $source = undef, $content = undef ) { if $ensure == 'present' { - if $source == '' and $content == undef { + if $source == undef and $content == undef { fail("One of \$source or \$content must be specified for apt_sources_snippet ${name}") } - if $source != '' and $content != undef { + if $source != undef and $content != undef { fail("Only one of \$source or \$content must specified for apt_sources_snippet ${name}") } } -- cgit v1.2.3 From 358459d2ef6fffa2775d25b168b8514f55167f38 Mon Sep 17 00:00:00 2001 From: varac Date: Thu, 3 Nov 2016 15:54:46 +0100 Subject: Fix preferences_snippet.pp for puppet 4 --- manifests/preferences_snippet.pp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'manifests') diff --git a/manifests/preferences_snippet.pp b/manifests/preferences_snippet.pp index b7dba0d..2b2fb74 100644 --- a/manifests/preferences_snippet.pp +++ b/manifests/preferences_snippet.pp @@ -2,9 +2,9 @@ define apt::preferences_snippet ( $priority = undef, $package = false, $ensure = 'present', - $source = '', - $release = '', - $pin = '' + $source = undef, + $release = undef, + $pin = undef ) { $real_package = $package ? { @@ -36,9 +36,9 @@ define apt::preferences_snippet ( } case $source { - '': { + undef: { case $release { - '': { + undef: { File["/etc/apt/preferences.d/${name}"]{ content => template('apt/preferences_snippet.erb') } -- cgit v1.2.3 From 5b5a5950c8600cbac53f92c3d2832347aa81f059 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis-Philippe=20V=C3=A9ronneau?= Date: Sat, 21 Jan 2017 15:06:41 -0500 Subject: use include instead of inherits --- manifests/reboot_required_notify/jessie.pp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'manifests') diff --git a/manifests/reboot_required_notify/jessie.pp b/manifests/reboot_required_notify/jessie.pp index 0dd6a18..18e619d 100644 --- a/manifests/reboot_required_notify/jessie.pp +++ b/manifests/reboot_required_notify/jessie.pp @@ -1,4 +1,6 @@ -class apt::reboot_required_notify::jessie ($ensure = present) inherits apt { +class apt::reboot_required_notify::jessie ($ensure = present) { + + include apt if $::operatingsystemmajrelease == 8 and ! $::apt::use_backports { fail('apt::reboot_required_notify requires $apt::use_backports on Jessie') -- cgit v1.2.3