+hkps_protocol_supported = fact('operatingsystem') =~ %r{Ubuntu} && \
+ fact('operatingsystemrelease') =~ %r{^18\.04}
+
+if hkps_protocol_supported
+ hkps_ubuntu_pp = <<-MANIFEST
+ apt_key { 'puppetlabs':
+ id => '#{PUPPETLABS_GPG_KEY_LONG_ID}',
+ ensure => 'present',
+ server => 'hkps://keyserver.ubuntu.com',
+ }
+ MANIFEST
+end
+