From 480b143a18e9f981a915cc00bca30379df5572ce Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Fri, 17 May 2024 14:15:54 +0200 Subject: [PATCH] use stdlib::ensure_packages to avoid warnings --- puppet/modules/discourse/manifests/init.pp | 2 +- puppet/modules/freight/manifests/user.pp | 2 +- puppet/modules/jenkins_job_builder/manifests/config.pp | 2 +- puppet/modules/jenkins_job_builder/manifests/install.pp | 2 +- puppet/modules/jenkins_node/manifests/packaging/debian.pp | 2 +- puppet/modules/jenkins_node/manifests/packaging/rpm.pp | 2 +- puppet/modules/jenkins_node/manifests/rbenv.pp | 2 +- puppet/modules/jenkins_node/manifests/unittests.pp | 8 ++++---- puppet/modules/profiles/manifests/discourse.pp | 2 +- puppet/modules/profiles/manifests/jenkins/controller.pp | 2 +- puppet/modules/redmine/manifests/init.pp | 2 +- puppet/modules/utility/manifests/init.pp | 4 ++-- 12 files changed, 16 insertions(+), 16 deletions(-) diff --git a/puppet/modules/discourse/manifests/init.pp b/puppet/modules/discourse/manifests/init.pp index 68bde43ed..2dc838572 100644 --- a/puppet/modules/discourse/manifests/init.pp +++ b/puppet/modules/discourse/manifests/init.pp @@ -9,7 +9,7 @@ Stdlib::Absolutepath $root = '/var/discourse', Stdlib::Host $hostname = 'community.theforeman.org', ) { - ensure_packages(['git']) + stdlib::ensure_packages(['git']) vcsrepo { $root: ensure => present, diff --git a/puppet/modules/freight/manifests/user.pp b/puppet/modules/freight/manifests/user.pp index bde773f25..ed1db412e 100644 --- a/puppet/modules/freight/manifests/user.pp +++ b/puppet/modules/freight/manifests/user.pp @@ -8,7 +8,7 @@ ) { require freight - ensure_packages(['ruby']) + stdlib::ensure_packages(['ruby']) file { "${home}/freight.conf": ensure => file, diff --git a/puppet/modules/jenkins_job_builder/manifests/config.pp b/puppet/modules/jenkins_job_builder/manifests/config.pp index 3a9188e70..4d47becff 100644 --- a/puppet/modules/jenkins_job_builder/manifests/config.pp +++ b/puppet/modules/jenkins_job_builder/manifests/config.pp @@ -15,7 +15,7 @@ $inifile = "${directory}/jenkins_jobs_${config_name}.ini" $git = if $facts['os']['release']['major'] == '7' { 'git' } else { 'git-core' } - ensure_packages([$git]) + stdlib::ensure_packages([$git]) vcsrepo { "${directory}/${git_project_name}": ensure => latest, diff --git a/puppet/modules/jenkins_job_builder/manifests/install.pp b/puppet/modules/jenkins_job_builder/manifests/install.pp index ad52545ab..4887fe8a5 100644 --- a/puppet/modules/jenkins_job_builder/manifests/install.pp +++ b/puppet/modules/jenkins_job_builder/manifests/install.pp @@ -4,7 +4,7 @@ String[1] $ensure = $jenkins_job_builder::ensure, ) { $yaml = if $facts['os']['release']['major'] == '7' { 'PyYAML' } else { 'python3-pyyaml' } - ensure_packages(['python-pip', $yaml]) + stdlib::ensure_packages(['python-pip', $yaml]) package { 'jenkins-job-builder': ensure => $jenkins_job_builder::ensure, diff --git a/puppet/modules/jenkins_node/manifests/packaging/debian.pp b/puppet/modules/jenkins_node/manifests/packaging/debian.pp index b54006b7e..37cca3d19 100644 --- a/puppet/modules/jenkins_node/manifests/packaging/debian.pp +++ b/puppet/modules/jenkins_node/manifests/packaging/debian.pp @@ -10,7 +10,7 @@ ensure => present, } - ensure_packages(['python3-pip', 'python3-setuptools', 'zstd']) + stdlib::ensure_packages(['python3-pip', 'python3-setuptools', 'zstd']) if $facts['os']['name'] == 'Debian' { include apt::backports diff --git a/puppet/modules/jenkins_node/manifests/packaging/rpm.pp b/puppet/modules/jenkins_node/manifests/packaging/rpm.pp index d1ec193ac..7b1dc7755 100644 --- a/puppet/modules/jenkins_node/manifests/packaging/rpm.pp +++ b/puppet/modules/jenkins_node/manifests/packaging/rpm.pp @@ -30,7 +30,7 @@ 'python3-pyyaml', ] - ensure_packages($obal_packages + $foreman_rel_eng_packages) + stdlib::ensure_packages($obal_packages + $foreman_rel_eng_packages) # specs-from-koji package { ['scl-utils-build', 'rpmdevtools']: diff --git a/puppet/modules/jenkins_node/manifests/rbenv.pp b/puppet/modules/jenkins_node/manifests/rbenv.pp index dd5b7a7e3..315974fe2 100644 --- a/puppet/modules/jenkins_node/manifests/rbenv.pp +++ b/puppet/modules/jenkins_node/manifests/rbenv.pp @@ -14,7 +14,7 @@ user => 'jenkins', } - ensure_packages(['gcc-c++']) + stdlib::ensure_packages(['gcc-c++']) rbenv::build { '3.1.0': } rbenv::build { '3.0.4': } diff --git a/puppet/modules/jenkins_node/manifests/unittests.pp b/puppet/modules/jenkins_node/manifests/unittests.pp index a8113d509..2db37eb4a 100644 --- a/puppet/modules/jenkins_node/manifests/unittests.pp +++ b/puppet/modules/jenkins_node/manifests/unittests.pp @@ -64,10 +64,10 @@ default => 'libyaml-devel' } - ensure_packages([$libxml2_dev, $libxslt1_dev, $libkrb5_dev, $systemd_dev, 'freeipmi', 'ipmitool', $firefox, $libvirt_dev, $libcurl_dev, - $sqlite3_dev, $libyaml_dev]) + stdlib::ensure_packages([$libxml2_dev, $libxslt1_dev, $libkrb5_dev, $systemd_dev, 'freeipmi', 'ipmitool', + $firefox, $libvirt_dev, $libcurl_dev, $sqlite3_dev, $libyaml_dev]) - ensure_packages(['python3-virtualenv']) + stdlib::ensure_packages(['python3-virtualenv']) # nodejs/npm for JavaScript tests if $facts['os']['family'] == 'RedHat' { @@ -116,7 +116,7 @@ # Needed for foreman-selinux testing if $facts['os']['family'] == 'RedHat' { - ensure_packages(['selinux-policy-devel']) + stdlib::ensure_packages(['selinux-policy-devel']) } # Needed by foreman_openscap gem dependency OpenSCAP diff --git a/puppet/modules/profiles/manifests/discourse.pp b/puppet/modules/profiles/manifests/discourse.pp index 734eb2c8d..b9efbe7c0 100644 --- a/puppet/modules/profiles/manifests/discourse.pp +++ b/puppet/modules/profiles/manifests/discourse.pp @@ -7,7 +7,7 @@ gpgkey => 'https://download.docker.com/linux/centos/gpg', } - ensure_packages(['docker-ce'], { require => Yumrepo['docker-ce-stable'] }) + stdlib::ensure_packages(['docker-ce'], { require => Yumrepo['docker-ce-stable'] }) service { 'docker': ensure => 'running', diff --git a/puppet/modules/profiles/manifests/jenkins/controller.pp b/puppet/modules/profiles/manifests/jenkins/controller.pp index b80a16e98..1c2497129 100644 --- a/puppet/modules/profiles/manifests/jenkins/controller.pp +++ b/puppet/modules/profiles/manifests/jenkins/controller.pp @@ -26,7 +26,7 @@ Array[String[1]] $packages = ['java-11-openjdk-headless', 'java-11-openjdk-devel', 'fontconfig'], Array[String[1]] $plugins = [], ) { - ensure_packages($packages) + stdlib::ensure_packages($packages) class { 'jenkins': install_java => false, diff --git a/puppet/modules/redmine/manifests/init.pp b/puppet/modules/redmine/manifests/init.pp index d393d53c3..4939a106c 100644 --- a/puppet/modules/redmine/manifests/init.pp +++ b/puppet/modules/redmine/manifests/init.pp @@ -60,7 +60,7 @@ 'make', ] - ensure_packages($packages) + stdlib::ensure_packages($packages) # Prevents errors if run from /root etc. Postgresql_psql { diff --git a/puppet/modules/utility/manifests/init.pp b/puppet/modules/utility/manifests/init.pp index 80fca3aae..f17b44810 100644 --- a/puppet/modules/utility/manifests/init.pp +++ b/puppet/modules/utility/manifests/init.pp @@ -5,10 +5,10 @@ default => 'vim', } - ensure_packages([$vim]) + stdlib::ensure_packages([$vim]) unless $facts['os']['family'] == 'RedHat' and $facts['os']['release']['major'] == '8' { - ensure_packages(['htop', 'iftop', 'screen']) + stdlib::ensure_packages(['htop', 'iftop', 'screen']) } # TODO: rsync package is managed by puppetlabs-rsync