Skip to content

Commit 5ecda93

Browse files
ekohlmmoll
authored andcommitted
Handle the pluginsync setting deprecation
In Puppet 4 the pluginsync setting was deprecated. At least in Puppet 5 it generates a deprecation warning and in Puppet 6 it was removed. Because the default was already true, we only emit it if it's non-default to avoid the deprecation warning. In Puppet 6 we can detect an invalid setting so we hard fail.
1 parent 964f110 commit 5ecda93

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

manifests/agent/config.pp

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
'localconfig': value => '$vardir/localconfig';
77
'default_schedules': value => false;
88
'report': value => $::puppet::report;
9-
'pluginsync': value => $::puppet::pluginsync;
109
'masterport': value => $::puppet::port;
1110
'environment': value => $::puppet::environment;
1211
'listen': value => $::puppet::listen;
@@ -32,6 +31,16 @@
3231
}
3332
}
3433

34+
unless $::puppet::pluginsync {
35+
if versioncmp($facts['puppetserver'], '6.0.0') >= 0 {
36+
fail('pluginsync is no longer a setting in Puppet 6')
37+
} else {
38+
puppet::config::agent { 'pluginsync':
39+
value => $::puppet::pluginsync,
40+
}
41+
}
42+
}
43+
3544
$::puppet::agent_additional_settings.each |$key,$value| {
3645
puppet::config::agent { $key: value => $value }
3746
}

0 commit comments

Comments
 (0)