From b989bd3d54a0677d9da325c8e7d9395d11d0d545 Mon Sep 17 00:00:00 2001 From: Micke Nordin Date: Fri, 8 Sep 2023 07:39:34 +0200 Subject: [PATCH] Hide deprecation warnings in Ubuntu 20.04 --- manifests/ubuntu_2004.pp | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 manifests/ubuntu_2004.pp diff --git a/manifests/ubuntu_2004.pp b/manifests/ubuntu_2004.pp new file mode 100644 index 0000000..b30e5c2 --- /dev/null +++ b/manifests/ubuntu_2004.pp @@ -0,0 +1,10 @@ +# Class for Ubuntu 20.04 +class sunetdrive::ubuntu_2004() { + if $facts['os']['name'] == 'Ubuntu' and $facts['os']['distro']['release']['full'] == '20.04' { + # Hide deprecation warnings for Ubuntu 2004 + file_line {'env_rubyopt': + path => '/etc/environment', + line => 'RUBYOPT=\'-W0\'', + } + } +}