From 226038eaa6d4eb7f4d1c56b607a0b1d4aad9a795 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Wed, 28 Feb 2018 23:35:01 +0100 Subject: [PATCH 1/2] purge legacy puppet-lint checks this check isn't needed anymore for puppet4 and newer --- Gemfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Gemfile b/Gemfile index 54862a93..95c1d668 100644 --- a/Gemfile +++ b/Gemfile @@ -10,7 +10,6 @@ group :development, :unit_tests do gem 'puppet-lint-unquoted_string-check', :require => false gem 'puppet-lint-empty_string-check', :require => false gem 'puppet-lint-spaceship_operator_without_tag-check', :require => false - gem 'puppet-lint-absolute_classname-check', :require => false gem 'puppet-lint-undef_in_function-check', :require => false gem 'puppet-lint-leading_zero-check', :require => false gem 'puppet-lint-trailing_comma-check', :require => false From c1746d25db738958c58a8f4d9a99f547b0a840d5 Mon Sep 17 00:00:00 2001 From: Tim Meusel Date: Wed, 28 Feb 2018 23:54:35 +0100 Subject: [PATCH 2/2] switch from topscope classes to relative scope --- manifests/dropin_file.pp | 2 +- manifests/init.pp | 8 ++++---- manifests/network.pp | 2 +- manifests/service_limits.pp | 2 +- manifests/tmpfile.pp | 2 +- manifests/unit_file.pp | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/manifests/dropin_file.pp b/manifests/dropin_file.pp index a6a910f1..55a8542f 100644 --- a/manifests/dropin_file.pp +++ b/manifests/dropin_file.pp @@ -36,7 +36,7 @@ Optional[String] $source = undef, Optional[Stdlib::Absolutepath] $target = undef, ) { - include ::systemd + include systemd if $target { $_ensure = 'link' diff --git a/manifests/init.pp b/manifests/init.pp index 6d8077cb..f90e6d19 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -44,19 +44,19 @@ Optional[Variant[Array,String]] $fallback_ntp_server = undef, ){ - contain ::systemd::systemctl::daemon_reload + contain systemd::systemctl::daemon_reload create_resources('systemd::service_limits', $service_limits) if $manage_resolved and $facts['systemd_internal_services'] and $facts['systemd_internal_services']['systemd-resolved.service'] { - contain ::systemd::resolved + contain systemd::resolved } if $manage_networkd and $facts['systemd_internal_services'] and $facts['systemd_internal_services']['systemd-networkd.service'] { - contain ::systemd::networkd + contain systemd::networkd } if $manage_timesyncd and $facts['systemd_internal_services'] and $facts['systemd_internal_services']['systemd-timesyncd.service'] { - contain ::systemd::timesyncd + contain systemd::timesyncd } } diff --git a/manifests/network.pp b/manifests/network.pp index 07672803..5a490051 100644 --- a/manifests/network.pp +++ b/manifests/network.pp @@ -9,7 +9,7 @@ Boolean $restart_service = true, ){ - include ::systemd + include systemd if $restart_service and $systemd::manage_networkd { $notify = Service['systemd-networkd'] diff --git a/manifests/service_limits.pp b/manifests/service_limits.pp index 2992c1c9..68ac03d5 100644 --- a/manifests/service_limits.pp +++ b/manifests/service_limits.pp @@ -34,7 +34,7 @@ Boolean $restart_service = true ) { - include ::systemd + include systemd if $name !~ Pattern['^.+\.(service|socket|mount|swap)$'] { fail('$name must match Pattern["^.+\.(service|socket|mount|swap)$"]') diff --git a/manifests/tmpfile.pp b/manifests/tmpfile.pp index 1e380af4..c18eaae7 100644 --- a/manifests/tmpfile.pp +++ b/manifests/tmpfile.pp @@ -31,7 +31,7 @@ Optional[String] $content = undef, Optional[String] $source = undef, ) { - include ::systemd::tmpfiles + include systemd::tmpfiles if $name =~ Pattern['/'] { fail('$name may not contain a forward slash "(/)"') diff --git a/manifests/unit_file.pp b/manifests/unit_file.pp index 4124bba1..d20f0488 100644 --- a/manifests/unit_file.pp +++ b/manifests/unit_file.pp @@ -34,7 +34,7 @@ Optional[String] $source = undef, Optional[Stdlib::Absolutepath] $target = undef, ) { - include ::systemd + include systemd assert_type(Systemd::Unit, $name)